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:
|
||||
user.identified_account = account
|
||||
user.identified_account_id = event["server"].get_user(
|
||||
account).id
|
||||
if realname:
|
||||
user.realname = realname
|
||||
|
||||
|
@ -475,10 +477,13 @@ class LineHandler(object):
|
|||
|
||||
if not 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,
|
||||
server=event["server"], account=event["args"][0])
|
||||
else:
|
||||
user.identified_account = None
|
||||
user.identified_account_id = None
|
||||
self.events.on("received.account.logout").call(user=user,
|
||||
server=event["server"])
|
||||
|
||||
|
|
Loading…
Reference in a new issue