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.

Enforcebans

Old posts that have not been replied to for several years.
Locked
User avatar
CooLB0Y
Voice
Posts: 29
Joined: Fri Mar 26, 2004 2:06 pm
Location: Australia

Enforcebans

Post by CooLB0Y »

I wanted to ask if there is a way to make a tcl simillar to +enforcebans, with +enforcebans the kick msg shows like this:
[16:36] * CooLB0Y sets mode: +b *!*@221.9.111.127
[16:36] * girl222 was kicked by OmanServ (Banned)

i want the kick reasson to be: girl222 was kicked by OmanServ (Banned by: CooLB0Y).

thanks,

Zadjali
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind mode - "* +b" enforcebans

proc enforcebans {nick uhost hand chan mc ban} {
 foreach n [chanlist $chan] {
  if {[string match -nocase $ban $n![getchanhost $n $chan]]} {
   putkick $chan $n "$n was kicked $::botnick (banned by: $nick)"
  }
 }
}
Edit: $::botnick instead of OmanServ.
User avatar
CooLB0Y
Voice
Posts: 29
Joined: Fri Mar 26, 2004 2:06 pm
Location: Australia

Post by CooLB0Y »

Thanks, what about if i want to add the banned ip to the kick reasson?
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

$ban is the banned ip.
User avatar
CooLB0Y
Voice
Posts: 29
Joined: Fri Mar 26, 2004 2:06 pm
Location: Australia

Post by CooLB0Y »

Thank you :)
Locked