summaryrefslogtreecommitdiff
path: root/poezio/user.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2017-11-12 15:03:09 +0100
committermathieui <mathieui@mathieui.net>2017-11-12 15:03:09 +0100
commitd55cc5872503567775f0d7a7731d6f489bf2299b (patch)
tree725f9e7b8144d36054447b3c82edfb45bda8df1d /poezio/user.py
parent92496db823db34f7f7fb1ab31eaef093a707c3e8 (diff)
downloadpoezio-d55cc5872503567775f0d7a7731d6f489bf2299b.tar.gz
poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.tar.bz2
poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.tar.xz
poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.zip
yapf -ir
Diffstat (limited to 'poezio/user.py')
-rw-r--r--poezio/user.py27
1 files changed, 15 insertions, 12 deletions
diff --git a/poezio/user.py b/poezio/user.py
index 0cf32f79..68d52493 100644
--- a/poezio/user.py
+++ b/poezio/user.py
@@ -4,7 +4,6 @@
#
# Poezio is free software: you can redistribute it and/or modify
# it under the terms of the zlib license. See the COPYING file.
-
"""
Define the user class.
An user is a MUC participant, not a roster contact (see contact.py)
@@ -20,22 +19,26 @@ from poezio.theming import get_theme
import logging
log = logging.getLogger(__name__)
-ROLE_DICT = {
- '':0,
- 'none':0,
- 'visitor':1,
- 'participant':2,
- 'moderator':3
- }
+ROLE_DICT = {'': 0, 'none': 0, 'visitor': 1, 'participant': 2, 'moderator': 3}
+
class User(object):
"""
keep trace of an user in a Room
"""
- __slots__ = ('last_talked', 'jid', 'chatstate', 'affiliation', 'show', 'status', 'role', 'nick', 'color')
-
- def __init__(self, nick, affiliation, show, status, role, jid, deterministic=True, color=''):
- self.last_talked = datetime(1, 1, 1) # The oldest possible time
+ __slots__ = ('last_talked', 'jid', 'chatstate', 'affiliation', 'show',
+ 'status', 'role', 'nick', 'color')
+
+ def __init__(self,
+ nick,
+ affiliation,
+ show,
+ status,
+ role,
+ jid,
+ deterministic=True,
+ color=''):
+ self.last_talked = datetime(1, 1, 1) # The oldest possible time
self.update(affiliation, show, status, role)
self.change_nick(nick)
if color != '':