First off, you never defined the lockblack channel setting, so I'm assuming you actually intended to use the lockunban.
Secondly, there's a much better way of checking whether the setting is set or not, using
channel get.
Finally, your post really does not say much as to what your script should do, should the channel setting not be set. The vast list of global variables also makes no sense..
I'm posting the fix regarding channel setting, but you really need to specify what it is you are asking for...
Code: Select all
setudef flag lockunban
proc blacklist:userdel {nickname hostname handle text} {
global unbanc botnick blacklist BLNicks lockblack bchanwork
if {[channel get $bchanwork lockunban]} {
puthelp "privmsg $nickname :sorry can't use this command."
puthelp "privmsg $nickname :pls contact with a OP."
} else {
#Rest goes here
}
}