Code: Select all
# tomekk, http://forum.egghelp.org/viewtopic.php?t=17169
# if you want to use this script on your chan, type in eggdrop console (via telnet or DCC chat)
# .chanset #channel_name +mops
# and later .save
############################################################################
bind part - "*" check_chan_ops
bind sign - "*" check_chan_ops
setudef flag mops
proc check_chan_ops { nick uhost hand chan msg } {
global botnick
if {![channel get $chan mops]} {
return
}
set channel_users [chanlist $chan]
set is_any_op 0
foreach chan_user $channel_users {
if {($chan_user != $nick) && ($chan_user != $botnick)} {
if {[isop $chan_user $chan]} {
set is_any_op 1
break
}
}
}
if {$is_any_op == 0} {
pushmode $chan +m
}
}
putlog "m-when-zero-ops.tcl ver 0.1 by tomekk loaded"
This script check only parts and signs, not net-splits.# iif you want to use this script on your chan, type in eggdrop console (via telnet or DCC chat)
# .chanset #channel_name +mops
# and later .save