Code: Select all
This enables the !nuke command - Requested by Quista - Version 4
bind pub lomn !nuke pub:nuke
proc pub:nuke {nick uhost hand chan text} {
global runchan defreason2
set kicknick [lindex [split $text] 0]
set reason [lrange [split $text] 1 end]
if {$reason == "" } {set reason $defreason2}
if {[onchan $kicknick $chan] == 1 } {
putcmdlog "!$hand! Nuked $kicknick in $chan"
putserv "KICK $chan $kicknick :$reason" } {
puthelp "Notice $nick :Unable to kick - Nickname does not correspond to channel user"
}
}
onchan $kicknick $chan ==1 or != 1 it has the same result. Is this a problem with my logic, or with the code itself?
Thanks