changeset 1ac938734956 in /home/hg/repos/gajim

details:http://hg.gajim.org/gajim?cmd=changeset;node=1ac938734956
description: prevent traceback when changing nick

diffstat:

 src/common/connection.py |  25 +++++++++++++------------
 1 files changed, 13 insertions(+), 12 deletions(-)

diffs (35 lines):

diff -r a2b260cb56b4 -r 1ac938734956 src/common/connection.py
--- a/src/common/connection.py  Thu Aug 27 20:09:57 2009 +0200
+++ b/src/common/connection.py  Thu Aug 27 20:15:54 2009 +0200
@@ -1746,18 +1746,19 @@
                self.add_lang(p)
                if not change_nick:
                        t = p.setTag(common.xmpp.NS_MUC + ' x')
-               last_date = gajim.logger.get_last_date_that_has_logs(room_jid, 
self.name,
-                       is_room=True)
-               if last_date is None:
-                       last_date = time.time() - 
gajim.config.get('muc_restore_timeout') * 60
-               else:
-                       last_time = min(last_date, time.time() - 
gajim.config.get(
-                               'muc_restore_timeout') * 60)
-               last_date = time.strftime('%Y-%m-%dT%H:%M:%SZ', 
time.gmtime(last_date))
-               t.setTag('history', {'maxstanzas': 
gajim.config.get('muc_restore_lines'),
-                       'since': last_date})
-               if password:
-                       t.setTagData('password', password)
+                       last_date = 
gajim.logger.get_last_date_that_has_logs(room_jid,
+                               self.name, is_room=True)
+                       if last_date is None:
+                               last_date = time.time() - gajim.config.get(
+                                       'muc_restore_timeout') * 60
+                       else:
+                               last_time = min(last_date, time.time() - 
gajim.config.get(
+                                       'muc_restore_timeout') * 60)
+                       last_date = time.strftime('%Y-%m-%dT%H:%M:%SZ', 
time.gmtime(last_date))
+                       t.setTag('history', {'maxstanzas': gajim.config.get(
+                               'muc_restore_lines'), 'since': last_date})
+                       if password:
+                               t.setTagData('password', password)
                self.connection.send(p)
 
                # last date/time in history to avoid duplicate
_______________________________________________
Commits mailing list
Commits@gajim.org
http://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to