PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: VAZ on 10 September, 2004, 02:49:41

Title: Description an e-mail checker
Post by: VAZ on 10 September, 2004, 02:49:41
is there possible to get a script that would check users description and e-mail , and if users would have like  a banned description  or e-mail they will be sent pm and kicked?
Title:
Post by: [PT]CableGuy on 10 September, 2004, 04:38:33
Try this one:

--AntiAdvert in des/email v1.03 by Phatty
table = {
["dns2go"]="Advertising",
["myftpsite"]="Advertising",
["xxx"]="XXX",
["porn"]="Porn",
}

function Main()
Bot = "BotName";
frmHub:EnableFullData(1)
end

function DataArrival(user,data)
if strsub(data,1,7) == "$MyINFO" then
for i,v in table do
if strfind(data,i) then
user:SendData(Bot,"You have "..v.." in description/email, please remove "..i.." and reconnect")
SendToOps(Bot,user.sName.." has been kicked because of "..v.." in MyInfo string")
user:Disconnect()
end
end
end
end

See more info there ----> anti-ad in description (http://board.univ-angers.fr/thread.php?threadid=1498&boardid=13&sid=bd5679cdbf4f33ff02d9758b5d798cce&page=3)
Good Luck.
Title:
Post by: VAZ on 11 September, 2004, 01:56:22
thank you  :D
Title:
Post by: VAZ on 13 September, 2004, 18:15:07
there is only one problem with this script ...
lets say i have the word "dave" banned in description and e-mail ok.  but if someone puts "Dave or DAVE" he gets in... is it possible to fix this?  so it does not matter though you have D or d ..just so the whole word gets banned?
Title:
Post by: [UK]Madman on 13 September, 2004, 18:37:57
If you enter all your triggers in lower case, then change


if strfind(data,i) then


to this

if strfind(strlower(data),i) then

It converts all the information into lower case before checking, removes case sensitivity.

Probably :P
Title:
Post by: VAZ on 13 September, 2004, 19:02:03
thank you it works great  :))
Title:
Post by: kazi on 17 October, 2004, 21:58:03
Hi,  what should I change when i want it to check in the e-mail field?   for example  when e mail field is not empty  then drop user (or disconnects?)