what is wrong in this?
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

what is wrong in this?

Started by Alexandros, 10 August, 2004, 23:03:22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Alexandros

--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(userdata)
if ( 
strsub(data14) == "$To:" then
for key,a in trigs do
if( 
strfindstrlower(data), key) ) then
SendPmToNick
("Alexandros",botnameuser.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

Troubadour

#1
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,

}
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

UwV

#2
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
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

Alexandros

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

UwV

#4
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..
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

UwV

just wondering .. does it work for you ?..
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

Alexandros

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
..."

UwV

#7
-- 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 ..
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

SMF spam blocked by CleanTalk