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.

on part ban

Old posts that have not been replied to for several years.
Locked
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

on part ban

Post by ReaLz »

how could I make a script that checks the part msgs of the people that part and if it sees an msg like "[censored]" for example to perm ban it?
«A fantastic spaghetti is a spaghetti that does not exist»
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

should be somewhat obvious after reading doc/tcl-commands.doc
cut&paste skills:

bind part <flags> <mask> <proc>
procname <nick> <user@host> <handle> <channel> <msg>
photon?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

bind part - * part:ban

proc part:ban {nick uhost handle channel reason} {
  if {$nick == $::botnick || ![string match "*bla*" $reason]} { return }
  set mask "*!*@[lindex [split $uhost @] 1]"
  newchanban $channel $mask PartBan "due your last part reason" 0
}
Replace the "*bla*" and "due your last part reason" with what suits you better.
Once the game is over, the king and the pawn go back in the same box.
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

thanx man :)
«A fantastic spaghetti is a spaghetti that does not exist»
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

uhm... I want something else if you can..
a script like the last one for channel notices... if the bot sees the word in the channel notice i want it to perm ban it..
«A fantastic spaghetti is a spaghetti that does not exist»
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

bind notc - * bad:notice

proc bad:notice {nick uhost hand text dest} {
  if {[lindex [split $dest "@"] 0] == $::botnick || [lindex [split $dest "@"] 1] != "" || ![string match "*bla*" $text]} { return }
  set mask "*!*@[lindex [split $uhost @] 1]"
  newchanban $dest $mask BadNotice "bad notice" 0
}
As usualy replace the messages as suit you better.
Once the game is over, the king and the pawn go back in the same box.
Locked