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