--Anti advertising script by SRJbb99 - 06.01.2003
--A bit modifyed and added that bot sends a PM to all ops on triger and kicks user by piglja - 18/03/03
botname = "SPAM"
trigs = {
["test"]=1,
["testhub"]=2,
["no-ip"]=3,
["1598"]=4,
["thehost"]=5,
}
function DataArrival(user, data)
if ( strsub(data, 1, 4) == "$To:" ) then
for key,a in trigs do
if( strfind( strlower(data), key) ) then
SendPmToNick("Alexandros",botname, user.sName.." has been advertising. His IP was "..user.sIP.." and he has been said '"..data.."'")
end
end
end
end
some trigs like "thehub" don't work, i say it and nothing happends!!
what is wrong in the script?
thanks
the word of "thehub" is not in your trig part like this
trigs = {
["test"]=1,
["testhub"]=2,
["no-ip"]=3,
["1598"]=4,
["thehost"]=5,
["thehub"]=6,
}
what's wrong with the script ? i am not sure ... but..
SendPmToNick("Alexandros",botname, user.sName.." has been advertising. His IP was "..user.sIP.." and he has been said '"..data.."'")
might need a space.. like this
SendPmToNick("Alexandros", botname, user.sName.." has been advertising. His IP was "..user.sIP.." and he has been saying '"..data.."'")
or even
SendPmToNick(Alexandros , botname, user.sName.." has been advertising. His IP was "..user.sIP.." and he has been said '"..data.."'")
BUT I AM SURE THIS IS NOT :
Quote--Anti advertising script by SRJbb99 - 06.01.2003
--A bit modifyed and added that bot sends a PM to all ops on triger and kicks user by piglja - 18/03/03
but that
--Anti advertising script by SRJbb99 - 06.01.2003
--A bit modifyed and added that bot sends a PM to all ops on triger and kicks user by piglja - 18/03/03
botname = "Advertising"
trigs = {
["dns2go"]=1,
["myftpsite"]=2,
["servebeer"]=3,
["mine.nu"]=4,
["ip.com"]=5,
["etc.etc.etc"]=6
}
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
SendPmToOps(botname, user.sName.." has been kicked because of advertising. His IP was "..user.sIP.." and he has been kicked because of word '"..key.."'")
user:Disconnect()
end
end
end
end
end
IS
ups...
testhub <<but 1598 works fine...
how do you edit that script (the original) to send PM to me and NOT to kick the spammer.
thanks again
well maybe this would work ?
code:
--------------------------------------------------------------------------------
-- Anti advertising script by SRJbb99 - 06.01.2003
-- A bit modifyed and added that bot sends a PM to all ops on triger and kicks user by piglja - 18/03/03
-- trying to help alexandro .. UvW-04
botname = "Adverteller"
trigs = {
["dns2go"]=1,
["myftpsite"]=2,
["servebeer"]=3,
["mine.nu"]=4,
["ip.com"]=5,
["etc.etc.etc"]=6
}
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
-- SendPmToOps(botname, user.sName.." has been kicked because of advertising. His IP was "..user.sIP.." and he has been kicked because of word '"..key.."'") -- original message to bot
SendPmToNick(Alexandros, botname, user.sName.." has been advertising. His IP was "..user.sIP.." and he has been saying '"..data.."' in witch i found " : '"..key.. "' ") -- **your thing .. and a bit of piglja's together
-- user:Disconnect() -- not disconnecting the user any more :0(
end
end
end
end
end
**i havent checked .. but make that part with your own nick the same as in the line hat worked for you .. and then this should,... work i think..
just wondering .. does it work for you ?..
sorry, i have no time to test it before...i have this error:
Syntax Error: `)' expected;
last token read: `:' at line 37 in string "-- Anti advertising script by SRJbb99 - 06.01.2003
..."
-- Anti advertising script by SRJbb99 - 06.01.2003
-- A bit modifyed and added that bot sends a PM to all ops on triger and kicks user by piglja - 18/03/03
-- trying to help alexandro .. UvW-04
botname = "Adverteller"
trigs = {
["dns2go"]=1,
["myftpsite"]=2,
["servebeer"]=3,
["mine.nu"]=4,
["ip.com"]=5,
["etc.etc.etc"]=6
}
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
-- SendPmToOps(botname, user.sName.."has been kicked because of advertising. His IP was "..user.sIP.." and he has been kicked because of word '"..key.."'") -- original message to bot
SendPmToNick(Alexandros, botname, user.sName.." has been advertising. His IP was "..user.sIP.." and he has been saying '"..data.."' in witch i found : '"..key.. "' ") -- **your thing .. and a bit of piglja's together
-- user:Disconnect() -- not disconnecting the user any more :0/ take away the -- in the beginning of the line to kick user again
end
end
end
end
end
--------------------------------------------------------
i guess i should have seen that (even before posting..)
but i rewrote that line in this little texeditorbox that comes here on this forum <-- *bad excuse
it was even missing this one ..
function DataArrival(user, data) .. ;0)
and .. i changed this:
in witch i found " : '"..key.. "' ") )
to :
" in witch i found : '"..key.. "' ") )
and that fixed it ..