Code: Select all
proc pub:unban { nick uhost hand chan text } {
global botnick drchan reason opsc tnick
if {[botisop $chan]} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[ischanban $tnick $chan]} {
killchanban $chan $tnick
putserv "MODE $chan -b $tnick"
putquick "privmsg X :unban $chan $tnick"
putserv "privmsg $opsc :$hand/$nick: I removed \002$tnick\002 from $chan" }
if {[isban $chan $tnick]} {
killban $tnick
} else { puthelp "NOTICE $nick : I can't see that ban in the channel list" }
} else { puthelp "NOTICE $nick :SYNTAX: .ub <nick!user@host> - unbans an address" }
} else { puthelp "NOTICE $nick :I Don't Have op!" }
}