PtokaX forum

Archive => Archived 4.0 boards => Finished Lua 4 scripts => Topic started by: Woodster on 16 February, 2004, 22:14:53

Title: anti swearing
Post by: Woodster on 16 February, 2004, 22:14:53
botName = "Ptokax"


--// Ban the following users ip on entry
forbiddenWords = {"fuck"},{"shit"},{"cunt"}

function Main()
frmHub:RegBot(botname)
end

--// This function is fired when a new user finishes the login
function NewUserConnected(curUser)
for key,checkWord in forbiddenWords do
if strfind(curUser.sMyInfoString, checkWord, 1, 1) then

curUser:Disconnect()


end
end
end

How will i not show the bot name in user list - if its possible (i really gotta learn how to do this)
Title:
Post by: kepp on 16 February, 2004, 22:33:05
you remove 3 lines!!

function main()
frmHub:RegBot()
end
Title:
Post by: Woodster on 16 February, 2004, 22:56:40
oh rele that simple LOL
Title:
Post by: pHaTTy on 17 February, 2004, 02:36:06
QuoteOriginally posted by Woodster
botName = "Ptokax"


--// Ban the following users ip on entry
forbiddenWords = {"fuck"},{"shit"},{"cunt"}

function Main()
frmHub:RegBot(botname)
end

--// This function is fired when a new user finishes the login
function NewUserConnected(curUser)
for key,checkWord in forbiddenWords do
if strfind(curUser.sMyInfoString, checkWord, 1, 1) then

curUser:Disconnect()


end
end
end

How will i not show the bot name in user list - if its possible (i really gotta learn how to do this)


*hint to save bandwidth and make it faster put it in dataarrival under version strsub ;)