PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: AMediaMan on 04 January, 2004, 05:42:53

Title: search names
Post by: AMediaMan on 04 January, 2004, 05:42:53
hello everyone, i hope the holidays went good for you all

heres my question. I'm looking for a script that will ban search names or bots before they get into the hub. I use
PtokaX td 4 any help would be cool.

                             Thnx, AMediaMan
Title:
Post by: kepp on 04 January, 2004, 15:13:50
BadNames = {"name","name1","name2","name3","name4","name5"}


function NewUserConnected(user)
      for key, i in BadNames do
         if strfind(user.sName,BadNames) then
            SendToNick(user.sName, "Your name is not allowed in here\r\nDisconnecting...")
            user:Disconnect()
         end
    end
end

^^ ?
Title:
Post by: AMediaMan on 04 January, 2004, 17:47:20
Thnx Kepp it seems to work but is there anyway to make it less specific..... like say not just the name search but anyone with search in their name. say like AMediaMan_search without having to have the AMediaMan in it or any other bot or something lol



               thnx, AMediaMan
Title:
Post by: NightLitch on 05 January, 2004, 23:47:08
here try this one AMediaMan:

-- Modified by: NightLitch 2004

BadNames = {"name","name1","name2","name3","name4","name5"}


function NewUserConnected(user)
if checkNicks(curUser) then
curUser:SendData(BotName," *** You are using a bad nick!")
curUser:Disconnect()
return 1
end
end

function checkNicks(curUser)
for key,nick in BadNames do
if strfind(strlower(curUser.sName), strlower(nick),1,1) then
return 1
end
end
end

Hope It works...
Title:
Post by: AMediaMan on 06 January, 2004, 04:32:20
NightLitch saves the day again lol thnx man seems to be working fine.


                     thnx much, AMediaMan






PtokaX is number 1

           PS. any word on a td 5 or am i slow lol