This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sat May 31, 2003 4:49 am
well my anti-advertisement script doesn't work for actions
like if someone types /me #bla... the bot doesn't consider it advertising, so it doesn't kick it
well here's my Advertist script
Code: Select all
set adv "advert1"
set ban-time 10
set aBan "Advertisement detected - Banned 10mins."
bind pubm .....
bind pub ....
proc advert {nick uhost hand chan rest} {
global botnick ban-time aBan adv
if [isop $nick $chan]==0 {
adduser $nick [maskhost [getchanhost $nick $chan]]
set banadver [maskhost [getchanhost $nick $chan]]
putquick "KICK $chan $nick :$aBan"
putquick "mode $chan +b $banadver"
utimer 600 "putserv \"mode $chan -b $banadver\""
return 0
}
}
as u see the ban-time doesn't work here too
so i put a utimer for unban.
so can somebody at to the script to make the ban-time work and make it kickban the user when he uses the Spam words with action ?
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Sat May 31, 2003 6:04 am
Do you have a bind ctcp * ACTION your:proc in there?
Once the game is over, the king and the pawn go back in the same box.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sat May 31, 2003 6:59 am
No, the only binds are :
bind pubm - "*badword 1*" advert
bind pub - "*badword2*" advert
bind ......(alot of badwords continue...
)
so, no there is no
bind ctcp * ACTION your:proc
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Sat May 31, 2003 8:55 am
Well, the /me #bla... is an action not a msg to channel. Guess you've figured out this by yourself after my last post, if not.. see in the tcl-commands.doc file the bind ctcp.
Once the game is over, the king and the pawn go back in the same box.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Jun 01, 2003 11:06 am
u mean i only need to add bind ctcp * ACTION your:proc and it'll work or what ?
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Sun Jun 01, 2003 3:54 pm
No, I mean you read from the tcl-commands.doc file the bind ctcp and make a proc using the instructions you'll find there to build up the proc.
Once the game is over, the king and the pawn go back in the same box.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Jun 01, 2003 4:31 pm
Quoted from tcl-commands.doc:
(32) ACT (stackable)
bind act <flags> <mask> <proc>
proc-name <handle> <channel#> <action>
Description: when someone does an action on the botnet, it invokes
this binding. flags are ignored; the mask is matched against the
text of the action and can support wildcards.
Module: core
I tried.. but i didn't understand... like pub and pubm make some sense but the ACT is a little complicated and also, they used PUB and PUBM , not MSG... so i don't know how to make it work
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Mon Jun 02, 2003 12:49 am
Code: Select all
bind ctcp * ACTION spam:action
proc spam:action {nick uhost hand dest keyword text} {
if {[lindex [split $dest "@"] 0] == $::botnick || [lindex [split $dest "@"] 1] != ""} {
return
}
# your rest of the banning code ..
}
The *if* makes shure that the destination of the action is the channel, not the botnick.
Once the game is over, the king and the pawn go back in the same box.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon Jun 02, 2003 1:40 pm
ok i just add it this code under the code in the script ? or what ?
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Mon Jun 02, 2003 1:49 pm
Something like this.. add it to your tcl file but don't forget to add the ban ning code..
Once the game is over, the king and the pawn go back in the same box.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon Jun 02, 2003 4:09 pm
ok thanx
i now use this :
Code: Select all
proc advert {nick uhost hand chan rest} {
global botnick ban-time aBan adv
if [isop $nick $chan]==0 {
adduser $nick [maskhost [getchanhost $nick $chan]]
set banadver [maskhost [getchanhost $nick $chan]]
putquick "KICK $chan $nick :Advertising detected - Banned 10mins."
putquick "mode $chan +b $banadver"
utimer 600 "putserv \"mode $chan -b $banadver\""
return 0
}
}
bind ctcp * ACTION spam:action
proc spam:action {nick uhost hand dest keyword text} {
if {[lindex [split $dest "@"] 0] == $::botnick || [lindex [split $dest "@"] 1] != ""} {
return
}
adduser $nick [maskhost [getchanhost $nick $dest]]
set banadver [maskhost [getchanhost $nick $dest]]
putquick "KICK $dest $nick :Advertising detected - Banned 10mins."
putquick "mode $dest +b $banadver"
utimer 600 "putserv \"mode $dest -b $banadver\""
return 0
}
putlog "Advertise kick script loaded..."
thats a good improvement right ?
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Mon Jun 02, 2003 4:22 pm
problem :S
this will kick a user for any action he does...
I just want it to kick the user when he says an advertisment word in his action... like for example : /me join #ss #ss #ss #ss........
what should i add or change ?
should i replace
with something like ?
Code: Select all
bind ctcp * "*spamword*" spam:action
like the
bind pub .... ??
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Tue Jun 03, 2003 12:50 am
Code: Select all
proc spam:action {nick uhost hand dest keyword text} {
if {[lindex [split $dest "@"] 0] == $::botnick || [lindex [split $dest "@"] 1] != ""} {
return
}
if {[matchattr $hand of|fo $dest] || [isop $nick $dest]} {
return
}
if {![string match "*#*" $text] || ![string match "*www.*" $text] || ![string match "*http://*" $text]} {
return
}
set mask "*!*@[lindex [split $uhost @] 1]"
newchanban $dest $mask Spam "\00224\002 hours ban for spaming within $dest" 1440
}
Once the game is over, the king and the pawn go back in the same box.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Tue Jun 03, 2003 9:08 am
Code: Select all
bind ctcp * ACTION spam:action
proc spam:action {nick uhost hand dest keyword text} {
if {[lindex [split $dest "@"] 0] == $::botnick || [lindex [split $dest "@"] 1] != ""} {
return
}
if {[matchattr $hand of|fo $dest] || [isop $nick $dest]} {
return
}
if {![string match "*#*" $text] || ![string match "*www.*" $text] || ![string match "*http://*" $text] || ![string match "*ftp://*" $text]} {
return
}
adduser $nick [maskhost [getchanhost $nick $dest]]
set mask [maskhost [getchanhost $nick $dest]]
putkick $nick $dest "Action Advertisement detected - Banned 10mins."
putquick "mode $dest +b $mask"
utimer 600 "putserv \"mode $dest -b $mask\""
return 0
}
Not working, its not giving any errors in the partyline, but its not kicking or bannin the user. where's the problem ?
i tried your ban code (set mask.... newchanban.....) it also didn't kick or ban.
arcane
Master
Posts: 280 Joined: Thu Jan 30, 2003 9:18 am
Location: Germany
Contact:
Post
by arcane » Thu Aug 14, 2003 7:58 am
dunno if its too late, but i have to correct this:
Code: Select all
if {![string match "*#*" $text] || ![string match "*www.*" $text] || ![string match "*http://*" $text] || ![string match "*ftp://*" $text]} {
return
}
replace here all "||"s with "&&"s.