bind pub o "!unban" unban:pubproc unban:pub {nick uhost hand chan text} { global botnick if {![botisop $chan]} { putserv "PRIVMSG $chan :I'm not opped!" } else { set chanbanlist [lsort -index 2 -integer -decreasing [chanbans $chan]] set last [lindex [lindex $chanbanlist end] 0] if {[llength $chanbanlist] > 0} { putquick "MODE $chan -b $last" return 0 } }}putlog "Unban last ban loaded successfully."