Im trying to write a script, that ask a second password, when connecting to partyline and when user flags are m or n
please help me my proc adminchk always never stop
###########
bind chon - * adminchk
proc adminchk {hand idx} {
if {[matchattr $hand n] == "1" } {
putidx $idx "Admin check, please enter your code" ; control $idx adminpass
} elseif {[matchattr $hand m] == "1" } {
putidx $idx "Admin check, please enter your code" ; control $idx adminpass
} else {
onpartylinejoin [idx2hand $idx] $idx;
}
}
proc adminpass {idx password} {
global nick
if {$password == ""} {; return 0 }
if {[encrypt $password $password]!= "tc6vV.oBehV1gmLeU/qMK8v."} {
putidx $idx "wrong password, Access Denied!"
dccbroadcast "ACCESS DENIED to [idx2hand $idx] , trying to admin"
killdcc $idx
return 1
}
onpartylinejoin [idx2hand $idx] $idx
return 1
}
proc onpartylinejoin {hand idx} {
global nick botnick botnet_version botnet_id thehand
set theidx $idx
set thehand $hand
if {[matchattr $thehand n]} {
putdcc $theidx "${logo} * Your Level is Owner"
dccbroadcast "${logo} [idx2hand $idx] is Owner --> ${botnick}"
} elseif {[matchattr $thehand m]} {
putdcc $theidx "${logo} * Your Level is Master"
dccbroadcast "${logo} [idx2hand $idx] is Master --> ${botnick}"
} elseif {[matchattr $thehand o]} {
putdcc $theidx "${logo} * Your Level is Operator:"
dccbroadcast "${logo} [idx2hand $idx] is Operator --> ${botnick}"
} else {
putdcc $theidx "${logo} * Your Level is Guest:"
dccbroadcast "${logo} [idx2hand $idx] is Guest --> ${botnick}"
}
}
proc b {} {
return 02
}