Correctly keep track of IRCUser.identified_account_id
This commit is contained in:
parent
6bd6f2492b
commit
ec119e3dcf
1 changed files with 5 additions and 0 deletions
|
@ -229,6 +229,8 @@ class LineHandler(object):
|
||||||
|
|
||||||
if account:
|
if account:
|
||||||
user.identified_account = account
|
user.identified_account = account
|
||||||
|
user.identified_account_id = event["server"].get_user(
|
||||||
|
account).id
|
||||||
if realname:
|
if realname:
|
||||||
user.realname = realname
|
user.realname = realname
|
||||||
|
|
||||||
|
@ -475,10 +477,13 @@ class LineHandler(object):
|
||||||
|
|
||||||
if not event["args"][0] == "*":
|
if not event["args"][0] == "*":
|
||||||
user.identified_account = event["args"][0]
|
user.identified_account = event["args"][0]
|
||||||
|
user.identified_account_id = event["server"].get_user(
|
||||||
|
event["args"][0]).id
|
||||||
self.events.on("received.account.login").call(user=user,
|
self.events.on("received.account.login").call(user=user,
|
||||||
server=event["server"], account=event["args"][0])
|
server=event["server"], account=event["args"][0])
|
||||||
else:
|
else:
|
||||||
user.identified_account = None
|
user.identified_account = None
|
||||||
|
user.identified_account_id = None
|
||||||
self.events.on("received.account.logout").call(user=user,
|
self.events.on("received.account.logout").call(user=user,
|
||||||
server=event["server"])
|
server=event["server"])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue