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.

how to check for modes ?

Old posts that have not been replied to for several years.
Locked
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

how to check for modes ?

Post by Sir_Fz »

Code: Select all

bind mode - "* +v" moderate:check

proc moderate:check {nick uhost hand chan mod vict} {
if {$vict == $::botnick} {return 0}
 if {[getchanmode $chan] == "*m*"} {return 0}
  putserv "MODE $chan -v $vict"
  putserv "NOTICE $nick :voice is only used when the channel is moderated"
}
this code is supposed to not devoice the victim if the channel is moderated (+m), but it doesn'y work, so how to make it see if the channel has +m in its modes?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

ok, found it :)

if {[string match *m* [lindex [getchanmode $chan] 0]]} {return 0}

thanx.
Locked