i want bot check every 5 mins if ops in channel less 2 ops then lock mode channel +m , now this script lock channel every 5 mins and not care about ops count
where is wrong in code ?
# Set how long that bot must check mode and lockmode back again.
set timeschks 5
set chan "#channel"
### Start Call Command
timer $timeschks opschk
proc opschk {} {
global timeschks chan
set ops 0
foreach nick [chanlist $chan] {
if {[isop $nick $chan]} {incr ops}
if {$ops < 2} { putserv "MODE $chan +m" }
}
timer $timeschks opschk
}
putlog "Loaded Successfuly..opscheck"