part message tcl

Old posts that have not been replied to for several years.
Locked
C
CafeiN

Post by CafeiN »

I need a tcl which bans users for specific words on part message with the format *!*@ip
G
Guest

Post by Guest »

bind part "*!*@* *foobar*" part:addban
proc part:addban {nick host hand chan {text ""}} {
global botnick
set host [lindex [split $host @] 1]
newban *!*@$host $botnick "Banned for putting 'foobar' in quitmsg"
putserv "MODE $chan +b *!*@$host"
}

Or something like that! It was quite similar to your other post, so I hope you'll learn from both code examples..
G
Guest

Post by Guest »

Oh, you may want to add some

if {[validuser $hand]} {return}

if you want added users to omit this functionality.
C
CafeiN

Post by CafeiN »

thanks simon it would be very helpful
Locked