i was looking for a script that i can set up to see if a list of chans that i set are +i or +m are set at intervals of about 5 mins that it will take away those chanmodes
#tested with 'windrop v1.6.19' sorry!
bind mode - "*" check:mode
bind time - "15 * * * *" checkmode:time
proc check:mode {nick host handle channel mode {target ""}} {
global botnick
if {($target != "")} {append mode " $target"}
if {([channel get $channel "checkmode"])} {
if {([regexp -all -- {(m|i)} "$mode"] > 0)} {
if {([botisop $channel])} {
putquick "MODE $channel -im"
return
}
}
}
}
proc checkmode:time {minute hour day month year} {
foreach chan [channels] {
if {([channel get $chan "checkmode"])} {
if {([regexp -all -- {(m|i)} "[lindex [split [getchanmode $chan] "+"] 1]"] > 0)} {
if {([botisop $chan])} {
putquick "MODE $chan -im"
}
}
}
}; return
}
setudef flag checkmode
putlog "loaded checkmode.tcl version 1.0 by TCL_no_TK"
return
The timer is set to check all channels set 'checkmode' for channel modes '+i' and '+m' as long as the bot is op'd on the channel where the modes are set it will unset them. It also checks modes being sets and if +i or +m are being set it will also remove them if it is op'd. To set a channel with the option 'checkmode' use (in DCC/CHAT):
.chanset <#channel-name> +checkmode
use '*' as <#channel-name> for it to work on all channels eggdrop is on, if you wish. And feel free to reply if you have any errors!