summaryrefslogtreecommitdiff
path: root/src/user.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2015-06-22 00:59:06 +0200
committermathieui <mathieui@mathieui.net>2015-06-22 00:59:06 +0200
commitc9aa439bbb953a59aa3387314e008f4f755ae61b (patch)
treee4dc26b8774f348f3caef95b7e01327480d50687 /src/user.py
parent79644da690c0255d286ebeee1e2792f3018ff568 (diff)
downloadpoezio-c9aa439bbb953a59aa3387314e008f4f755ae61b.tar.gz
poezio-c9aa439bbb953a59aa3387314e008f4f755ae61b.tar.bz2
poezio-c9aa439bbb953a59aa3387314e008f4f755ae61b.tar.xz
poezio-c9aa439bbb953a59aa3387314e008f4f755ae61b.zip
Add slots to the User object
(we can have thousands of these)
Diffstat (limited to 'src/user.py')
-rw-r--r--src/user.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/user.py b/src/user.py
index b1796bc3..4142869b 100644
--- a/src/user.py
+++ b/src/user.py
@@ -32,6 +32,8 @@ 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
self.update(affiliation, show, status, role)