Can somebody please help me translating the scipt bellow to 5.1.x ? : )
btw.. This script works perfect for my hub except cause advertisers dont receive
the reason they was ban and it's post only to main chat ... Other way it's light and fast
botname = "AntiAdvertising"
trigs = {["dns2go"]=1,["myftpsite"]=2,["servebeer"]=3,["mine.nu"]=4}
function Main()
frmHub:RegBot(botname)
end
function DataArrival(user, data)
if (not user.bOperator) then
if (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then
for key,a in trigs do
if( strfind( strlower(data), key) ) then
SendToAll( botname, user.sName.." has been ban 'cause of advertising !" )
user:Ban()
end
end
end
end
end
really thx in advance
make :
" strsub " be " string.sub "
" strfind " be " string.find "
" strlower " be " string.lower "
and :
" for key,a in trigs do " be " for key,a in pairs(trigs) do "
then see what it does ..
Oops..
" function DataArrival(user, data) " be " function ChatArrival(user, data) "
and add this line :
" ToArrival = ChatArrival "
aah.. what the h*** ..
botname = "AntiAdvertising"
trigs = {["dns2go"]=1,["myftpsite"]=2,["servebeer"]=3,["mine.nu"]=4}
function Main()
frmHub:RegBot(botname)
end
function ChatArrival(user, data)
if (not user.bOperator) then
if (( string.sub(data, 1, 1) == "<" ) or ( string.sub(data, 1, 4) == "$To:" )) then
for key,a in pairs(trigs) do
if( string.find( string.lower(data), key) ) then
SendToAll( botname, user.sName.." has been ban 'cause of advertising !" )
user:Ban()
end
end
end
end
end
ToArrival = ChatArrival
Now is OK LOL
hihi
you fast clicking you ..
posting while i am editing ... hehe
Yeah and I'm sorry for this... I have delete my post ^_^
Quote from: 6Marilyn6Manson6 on 10 July, 2006, 23:57:16
Yeah and I'm sorry for this... I have delete my post ^_^
no need to be sorry no need to delete .. all cool imo
Quote
no need to be sorry no need to delete .. all cool? imo
Oh thanks, im happy for this :p
happy to read you're happy :op
Thx pretty much : )))))
It works pretty well : )
if (( string.sub(data, 1, 1) == "<" ) or ( string.sub(data, 1, 4) == "$To:" )) then
This is useless...
Quote from: Markitos on 11 July, 2006, 07:27:11
if (( string.sub(data, 1, 1) == "<" ) or ( string.sub(data, 1, 4) == "$To:" )) then
This is useless...
sure is..
botname = "AntiAdvertising"
trigs = {["dns2go"]=1,["myftpsite"]=2,["servebeer"]=3,["mine.nu"]=4}
function Main()
frmHub:RegBot(botname)
end
function ChatArrival(user, data)
if (not user.bOperator) then
for key,a in pairs(trigs) do
if( string.find( string.lower(data), key) ) then
SendToAll( botname, user.sName.." has been ban 'cause of advertising !" )
user:Ban()
end
end
end
end
ToArrival = ChatArrival
I've found that those doing spam are getting smarter and using IPs for their advertising ..
So perhaps add:
if string.find(data, "(%d+)(%.)(%d+)(%.)(%d+)(%.)(%d+)") then
>
Just a suggestion..
Regards,
Snooze
sBot = "AntiAdvertising"
trigs = {["dns2go"]=1,["myftpsite"]=2,["servebeer"]=3,["mine.nu"]=4}
ChatArrival = function(user,data)
if not user.bOperator then
for v,k in pairs(trigs) do
if string.find(string.lower(data), v) then
SendToAll(sBot, user.sName.." has been ban 'cause of advertising !" )
user:SendData(sBot, "You fool!!! No advertising here")
user:Ban()
else
if string.find(data, "(%d+)(%.)(%d+)(%.)(%d+)(%.)(%d+)") then
SendToAll(sBot, user.sName.."has been ban because of advertising!")
user:SendData(sBot, "You fool!!! No advertising here")
user:Ban()
end
end
end
end
end
ToArrival = ChatArrival
No tested...
hi,
i was searching for an antiadvertise script and saw this fit for my requirements but this script is not blocking the advertise even if the person gets banned.
Quote
[17:50:49] <Fusion> You fool!!! No advertising here
[17:50:49] <Fusion> achie has been ban 'cause of advertising !
[17:50:49] <achie> login to my hub
also if some 1 tries to send an ip across it sends the banned messege 2 or 3 time i.e.
Quote
[17:58:37] <Fusion> You fool!!! No advertising here
[17:58:37] <Fusion> You fool!!! No advertising here
[17:58:37] <Fusion> You fool!!! No advertising here
[17:58:37] <Fusion> You fool!!! No advertising here
[17:58:37] <Fusion> achie has been ban because of advertising!
[17:58:37] <Fusion> achie has been ban because of advertising!
[17:58:37] <Fusion> achie has been ban because of advertising!
[17:58:37] <Fusion> achie has been ban because of advertising!
[17:58:37] <achie> 172.19.40.41
so can this be done with?
or is there already a better version of anti advertise scripts that blocks the main and pm ads, which i have misssed then plzz inform me so.
thks,
achiever.
mayby like this ;)
sBot = "AntiAdvertising"
trigs = {["dns2go"]=1,["myftpsite"]=2,["servebeer"]=3,["mine.nu"]=4}
ChatArrival = function(user,data)
if not user.bOperator then
for v,k in pairs(trigs) do
if string.find(string.lower(data), v) or data:find("(%d+)(%.)(%d+)(%.)(%d+)(%.)(%d+)") then
SendToAll(sBot, user.sName.." has been ban 'cause of advertising !" )
user:SendData(sBot, "You fool!!! No advertising here")
user:Ban()
return 1
end
end
end
end
ToArrival = ChatArrival
hi,
giving error
[20:57] Syntax D:\0.3.5.1.lua5.1.1\scripts\antiadvertise.lua:7: unexpected symbol near '%'
thks,
achiever.
Quote from: achiever on 10 April, 2007, 17:35:18
hi,
giving error
[20:57] Syntax D:\0.3.5.1.lua5.1.1\scripts\antiadvertise.lua:7: unexpected symbol near '%'
thks,
achiever.
post updated sry missed one "
woking fine thks.
can u also make a change to the script, such that when a user gets banned his advertise should get added to a text file which could be seen on cammand.
thks for help,
achiever.
Quote from: C??o?y?? on 10 April, 2007, 16:13:37
mayby like this ;)
sBot = "AntiAdvertising"
trigs = {["dns2go"]=1,["myftpsite"]=2,["servebeer"]=3,["mine.nu"]=4}
ChatArrival = function(user,data)
if not user.bOperator then
for v,k in pairs(trigs) do
if string.find(string.lower(data), v) or data:find("%d+)(%.)(%d+)(%.)(%d+)(%.)(%d+)") then
SendToAll(sBot, user.sName.." has been ban 'cause of advertising !" )
user:SendData(sBot, "You fool!!! No advertising here")
user:Ban()
return 1
end
end
end
end
ToArrival = ChatArrival
%d+) ?
(first one, line 7, IP finder)
Quote from: Naithif on 10 April, 2007, 20:57:27
%d+) ?
(first one, line 7, IP finder)
hehe... this happens when you do many thing at same time :P
post updated again ;)
hi,
can this script also made to work for pm ads??
thks,
achiever.
still it needs the change to stop pm ads :-\
working fine.
thks,
achiever.
Quote[ 156 ] On April 14 2007 19:33:25 [ fido_x-36 ] wrote: any 1 wanna join Volcano hub Pm Me.....................
lol now ppl r using message board to post their advertise..
can u help me.
should this be reported on the message board topic?
thks,
achiever.
well yes, did catch the ad when placed the script above message board script.
Quote from: Mutor on 14 April, 2007, 17:13:54
Yes that's probably best.
do u still want me report this in messageboard topic?
thks,
achiever.