Fix registration cancellation bug in regproc
This commit is contained in:
parent
fe86d30155
commit
fc3a349cb3
|
@ -33,4 +33,4 @@
|
|||
"pending": "pending [<network>]",
|
||||
"authcheck": "authcheck [<network>]",
|
||||
"recheckauth": "recheckauth [<network>]"
|
||||
}
|
||||
}
|
|
@ -42,7 +42,7 @@ def substitute(net, num, token=None):
|
|||
def registerAccount(net, num):
|
||||
debug("Attempting to register: %s - %i" % (net, num))
|
||||
sinst = substitute(net, num)
|
||||
if not inst["register"]:
|
||||
if not sinst["register"]:
|
||||
error("Cannot register for %s: function disabled" % (net))
|
||||
return False
|
||||
name = net+str(num)
|
||||
|
@ -68,7 +68,10 @@ def confirmRegistration(net, num, negativepass=None):
|
|||
return
|
||||
if name in main.IRCPool.keys():
|
||||
if main.IRCPool[name]._regAttempt:
|
||||
main.IRCPool[name]._regAttempt.cancel()
|
||||
try:
|
||||
main.IRCPool[name]._regAttempt.cancel()
|
||||
except:
|
||||
pass
|
||||
obj.relays[num]["registered"] = True
|
||||
main.saveConf("network")
|
||||
|
||||
|
@ -102,7 +105,6 @@ def registerTest(c):
|
|||
return
|
||||
if inst["ping"]:
|
||||
if inst["checkmsg2"] in c["msg"] and c["nick"] == inst["entity"]:
|
||||
print("CHECKMSG2 SUCCEEDED", c["num"])
|
||||
confirmRegistration(c["net"], c["num"])
|
||||
return
|
||||
if inst["checktype"] == "msg":
|
||||
|
|
Loading…
Reference in New Issue