PtokaX forum

Archive => Archived 5.1 boards => Help with scripts => Topic started by: Tw?sT?d-d?v on 21 February, 2007, 21:03:00

Title: help with anti-advert please
Post by: Tw?sT?d-d?v on 21 February, 2007, 21:03:00
How can i alter this so that i can add words with spaces in them ?
EG ,     ["h u b"]=48,
I have tried just adding these but they still get past


--------------------------------------------------------------------------------
-- anti advertise
-- OPs cannot post adverts in PM but Master can :P
--------------------------------------------------------------------------------
antiadds = {
["gotdns"]=1,
["bounceme.net"]=2,
["hopto.org"]=3,
["myftp.biz"]=4,
["myftp.org"]=5,
["myvnc.com"]=6,
["ip.biz"]=7,
["ip.info"]=8,
["ip.org"]=9,
["redirectme.net"]=10,
["servebeer.com"]=11,
["servecounterstrike.com"]=12,
["serveftp.com"]=13,
["servegame.com"]=14,
["servehalflife.com"]=15,
["servehttp.com"]=16,
["servemp3.com"]=17,
["servepics.com"]=18,
["servequake.com"]=19,
["sytes.net"]=20,
["zapto.org"]=21,
["ciscofreak.com"]=22,
["damnserver.com"]=23,
["http://"]=24,
["ditchyourip.com"]=25,
["dnsiskinky.com"]=26,
["geekgalaxy.com"]=27,
["freaks.com"]=28,
["ip.ca"]=29,
["ip.co.uk"]=30,
["ip.com"]=31,
["ip.net"]=32,
["point2this.com"]=33,
["securityexploits.com"]=34,
["securitytactics.com"]=35,
["servehumour.com"]=36,
["servep2p.com"]=37,
["servesarcasm.com"]=38,
["stufftoread.com"]=39,
["workisborring.com"]=40,
["musicdvdworld"]=41,
["dchub://"]=42,
["www."]=43,
["hub"]=44,
["no-ip"]=45,
["dash"]=46,
["dot"]=47,
}
--------------------------------------------------------------
Bot = frmHub:GetHubBotName()
function ToArrival(user, data)
if user.iProfile ~= 0  and user.iProfile ~= 4 and user.iProfile ~= 5 then
for key,a in antiadds do
if( string.find(string.lower(data), key) ) then
        user:SendPM(Bot, "Sorry, your PM was blocked. Please use main chat to post adverts!")
        return 1
        end
end
end
end
-- EOF


Title: Re: help with anti-advert please
Post by: bastya_elvtars on 21 February, 2007, 21:05:38
Try  %s+ where you expect spaces.
Title: Re: help with anti-advert please
Post by: Tw?sT?d-d?v on 22 February, 2007, 20:22:47
Thx m8     seems to be working fine ...   (Had no complaints yet anyway)
Title: Re: help with anti-advert please
Post by: jack_port1000 on 17 June, 2007, 00:40:46
this code where to paste ? just show me the path
some of user advert like this join 172....233......222...xyz  is this bot block them and where keep this all code u showing here sorry i m totaly new for this
Title: Re: help with anti-advert please
Post by: Madman on 17 June, 2007, 09:02:18
paste in to notepad, and then save it as a .lua file. Then place the lua file in the Scripts folder
Title: Re: help with anti-advert please
Post by: Tw?sT?d-d?v on 17 June, 2007, 11:31:54
If that dont work for you   ..  download the attachment and place in the scripts folder & restart scripts