Code: Select all
# Kicks someone off the channel
# Usage: !kick <nick> <reason>
# Ex: !kick Joe You suck!
proc pub:kick {nick uhost hand chan args} {
if {(![auth:check $hand]) && (![isop $nick $chan])} {return 0}
set args [split [cleanarg $args]]
if {[llength $args] < 2} {
notice $nick "Usage: !kick <nick> <reason>"
return 0
}
if {$hand == "*"} {return 0}
if {([isop $hand $chan]) || ([matchattr $hand "|o" $chan]) || ([matchattr $hand "o"])} {
set who [lindex $args 0]
set reason [lrange $args 1 end]
putserv "KICK $chan $who :$reason"
putcmdlog "<<$nick>> !$hand! kick $args"
} else {
notice $nick "You can't do that!"
}
}
<<clarck>> !bukyo! kick \{bukyo bye\}