Track a user's away status in IRCUser
This commit is contained in:
parent
be39669580
commit
0d863a4239
2 changed files with 3 additions and 0 deletions
|
@ -449,9 +449,11 @@ class LineHandler(object):
|
|||
user = event["server"].get_user(nickname)
|
||||
message = event["arbitrary"]
|
||||
if message:
|
||||
user.away = True
|
||||
self.events.on("received.away.on").call(user=user,
|
||||
server=event["server"], message=message)
|
||||
else:
|
||||
user.away = False
|
||||
self.events.on("received.away.off").call(user=user,
|
||||
server=event["server"])
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ class User(object):
|
|||
self.bot = bot
|
||||
self.channels = set([])
|
||||
self.identified_account = None
|
||||
self.away = False
|
||||
self.buffer = IRCBuffer.Buffer(bot)
|
||||
|
||||
def __repr__(self):
|
||||
|
|
Loading…
Reference in a new issue