spam bot
 

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

spam bot

Started by Alexandros, 16 October, 2003, 05:13:00

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Alexandros

I have this bot:

--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 = {
["testfddfskdjfkls"]=1,
["xxx.xxx.xxx.xxx"]=2
}

function DataArrival(user, data)
if ( strsub(data, 1, 4) == "$To:" ) then
for key,a in trigs do
if( strfind( strlower(data), key) ) then
SendPmToNick("blablabal",botname, user.sName.." has been advertising. His IP was "..user.sIP.." and he has been said '"..key.."'")
end
end
end
end



what i need to do to add another word, and to allow empty chars....like this ["t e s t 1 0"]=1,???
thanks

Alex

Alexandros


servaks

Try this one, forks fine for me...

--Botname
botname = "Hub-Security"
--Ban for ... mins
minutes = "5"

trigs = {
["blabla"]=1,
["b l a b l a"]=2,
["b  l  a  b  l  a"]=3,
} 

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 kicked because of advertising." ) 
user:TimeBan(minutes)
user:Disconnect()
end 
end 
end
end 
end

/shipis
My hub is back! (yeeeeeey)

hub.servaks.com


pHaTTy

iev never seen someone advertise that b4 tho :P
Resistance is futile!

Alexandros

what i need to do if i don't want to kick ...i only want to receibe a message...

Thanks again

[NL]Pur

try to add a  SendToOps

Alexandros

now i have 3 things:

B L A

B L A B L A S

B L A S

the script always say someone is saying B L A ...instead of the other 2 things...

Another thing: is there a way  to get all the spammer is saying in this line (in the line he say the forbidden word)?

thankyou again


P.D: I have this bot:

--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 = {

["testfddfskdjfkls"]=1,

["xxx.xxx.xxx.xxx"]=2,

}

function DataArrival(user, data)
if ( strsub(data, 1, 4) == "$To:" ) then
for key,a in trigs do
if( strfind( strlower(data), key) ) then
SendPmToNick("blablabal",botname, user.sName.." has been advertising. His IP was "..user.sIP.." and he has been said '"..key.."'")
end
end
end
end

klownietklowniet

#7
The loop stops at the first it encounted of a key, so "B L A" is the first, I can't really see why you got the other 2 there....

For your question change

SendPmToNick("blablabal",botname, user.sName.." has been advertising. His IP was "..user.sIP.." and he has been said '"..key.."'")

to:

SendPmToNick("blablabal",botname, user.sName.." has been advertising. His IP was "..user.sIP.." and he has been said '"..data)

Don't remember if you need to remove the pipe at the end, but since you are not adding anything to the end of the string it shouldn't matter I think...



PS: Spamming is NOT the same as advertising...
[ > DC - UniteD < ]

Alexandros

Thanks!!!!javascript:smilie(':D')
javascript:smilie(':D')javascript:smilie(':D')
javascript:smilie(':D')javascript:smilie(':D')
javascript:smilie(':D')javascript:smilie(':D')
javascript:smilie(':D')javascript:smilie(':D')
javascript:smilie(':D')

SMF spam blocked by CleanTalk