summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-06-13 01:30:06 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-06-13 01:30:06 +0000
commitd03ce7e869efdec9efed855a73539b33027a52c8 (patch)
tree469b8999851d2c99d64dd762e4a83d27e464b52c /src
parent1ae7bc2f63a19569cbdc1ca18b6a400263c22011 (diff)
downloadpoezio-d03ce7e869efdec9efed855a73539b33027a52c8.tar.gz
poezio-d03ce7e869efdec9efed855a73539b33027a52c8.tar.bz2
poezio-d03ce7e869efdec9efed855a73539b33027a52c8.tar.xz
poezio-d03ce7e869efdec9efed855a73539b33027a52c8.zip
fix the hide_join_exit and hide_status_change options not working, also don't send the vcard if we are not using anonymous auth
Diffstat (limited to 'src')
-rw-r--r--src/multiuserchat.py3
-rw-r--r--src/room.py2
-rw-r--r--src/user.py4
3 files changed, 8 insertions, 1 deletions
diff --git a/src/multiuserchat.py b/src/multiuserchat.py
index a54874a7..fec1d0d3 100644
--- a/src/multiuserchat.py
+++ b/src/multiuserchat.py
@@ -140,7 +140,8 @@ class MultiUserChat(object):
else:
nick = config.get('default_nick', 'poezio')
self.handler.emit('join-room', room=roomname, nick=nick)
- self.vcard_sender.start()
+ if config.get('jid', '') == '': # Don't send the vcard if we're not anonymous
+ self.vcard_sender.start() # because the user ALREADY has one on the server
def send_message(self, room, message):
mes = Message(to=room)
diff --git a/src/room.py b/src/room.py
index f210aa4c..bcd302a8 100644
--- a/src/room.py
+++ b/src/room.py
@@ -65,6 +65,8 @@ class Room(object):
in the room anymore
"""
user = self.get_user_by_name(nickname) if nickname is not None else None
+ if user:
+ user.set_last_talked(datetime.now())
time = time if time is not None else datetime.now()
color = None
if nickname is not None:
diff --git a/src/user.py b/src/user.py
index 6f0f3328..6dc87c73 100644
--- a/src/user.py
+++ b/src/user.py
@@ -52,10 +52,14 @@ class User(object):
Return True if the user talked since the last s seconds
"""
from common import debug
+ debug('anus===========\n')
if self.last_talked is None:
+ debug('return False1\n')
return False
delta = timedelta(0, t)
debug("Last talk: %s\nDelai:%s\nDelta:%s\n" % (str(self.last_talked), str(t), str(delta)))
if datetime.now() - delta > self.last_talked:
+ debug('return False2\n')
return False
+ debug('return True')
return True