My head doesn't understand loops in loops, and neither does my bot, as the code is wrong, anyway I digress...
Code: Select all
proc cmd:opstatus {nick uhost hand chan args} {
global botnick hubchan userchan
set message ""
foreach channel [channels] {
if {[onchan $botnick $channel]} {
if {![botisop $channel]} {
foreach user [chanlist $channel] {
if {![isop $user $channel]} {
set message "$message \0034$channel\003"
break
} elseif {[isop $user $channel]} {
set message "$message \00310$channel\003"
break
}
}
}
}
}
if {$message != ""} {
log "opstatus\: $message"
}
}
Problem being that is that it ignores this logic and prints out the \0034 line regardless if there are op's or not.
</long post>
Thanks for any help