bind pub o !qban pub:qban
proc pub:qban {nick uhost hand chan text} {
if {[botisop $chan]} {
if {[string length $text] > 0} {
set tnick [lindex $text 0]
if {[onchan "Q" $chan]} { putserv "PRIVMSG Q :chanlev $chan $tnick +b" }
putserv "KICK $chan $tnick :You have been Qbanned by $nick"
putserv "NOTICE $nick :Done."
} elseif {[onchan "L" $chan]} { puthelp "NOTICE $nick :There is no Q on this channel." }
putserv "MODE $chan +b $tnick"
putserv "KICK $chan $tnick :Due to no Q being in this channel you are being kicked."
} else { puthelp "NOTICE $nick :usage !qban <nick>" }
}
Now what this script is supposed to do is put the +b flag on that person's account but if it detects there is no Q in the channel but an L it should add it but just kickban the user instead, But it doesnt seem to notice if a Q or L is in the channel as the script does kick that person and say Done. but then it will also set the ban on the users nick and if he has returned by then it will kick with the message "Due to no Q being in this channel you are being kicked."
If someone could fix it for me i would be gratefull

Now if i didnt make sense tell me and ill try to rephrase it
