#Permban someone
proc pub_do_perm {nick host handle channel testes} {
global botnick
set why [lrange $testes 1 end]
set who [lindex $testes 0]
set ban [maskhost [getchanhost $who $channel]]
if {$who == ""} {
putserv "NOTICE $nick :Usage: !perm <Nick to shitlist>"
return 1
}
if {![onchan $who $channel]} {
putserv "NOTICE $nick :$who aint on $channel."
return 1
}
if {[string tolower $who] == [string tolower $botnick]} {
putserv "KICK $channel $nick :Dumbass. I aint bannin' myself!"
return 1
}
if {[matchattr $who +n]} {
putserv "NOTICE $who :$nick tried to permban you. Better have a talk with him."
putserv "NOTICE $nick :You tried to permban $who, He's an OWNER! I'm tellin' him now..."
return 1
}
newchanban $channel $ban $nick $why
stick $ban $channel
putserv "KICK $channel $who :$why"
putlog "$nick made me permban $who who was $ban and the reason was $why."
putserv "NOTICE $nick :PermBanned $who on $channel with reason: $why."
return 1
}
#end of pub_do_perm