invalid command name "else" while executing "else { puthelp "NOTICE $nick :cant do that " ; return 0 }" (procedure "pub_lol_remove" line 16) invoked from within "pub_lol_remove $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"
Code: Select all
proc pub_lol_remove {nick host hand chan arg} {
set arg [charfilter $arg]
set noremove "#chan1 #chan2"
global lol botnick
if {![check $hand $nick $host]} {
if {$lol(silent) == 1 || [checksilent $hand]} {return 0}
puthelp "NOTICE $nick :You need to be identified to use this function. Type .identhelp in the partyline for more info. : \002/msg $botnick id <password>\002 or \002/msg $botnick silent <password>\002 to no more receive this warning."
return 0
}
set ch [lindex $arg 0]
if {$ch != ""} {set ch [chanaddapt $ch]}
if {$ch == ""} {set ch $chan}
if {![validchan $ch]} { puthelp "NOTICE $nick :I'm not on $ch " ; return 0 }
if {[lsearch -exact $noremove [string tolower $ch]] != -1} { puthelp "NOTICE $nick :Can't do that " ; return 0 }
channel remove $ch
puthelp "NOTICE $nick :$ch has been removed."
}
if {[matchattr $hand |X $ch]}
{channel remove $ch return 0}
but not sure of how to get it to send the msg if they dont meet the correct flags