From 36ea39e74a4bcb410bf3b89e88449ded1c728bea Mon Sep 17 00:00:00 2001 From: Alexander Cherniuk Date: Sun, 28 Mar 2010 15:36:51 +0300 Subject: [PATCH] Fixed the autorejoin bug with overlimited MUC. Fixes #5678 --- src/common/connection_handlers.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index 3136083da..208f1b73e 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -1767,10 +1767,11 @@ ConnectionCaps, ConnectionHandlersBase, ConnectionJingle): self.dispatch('NOTIFY', (jid_stripped, 'error', errmsg, resource, prio, keyID, timestamp, None)) elif (errcode == '503'): - # maximum user number reached - self.dispatch('ERROR', (_('Unable to join group chat'), - _('Maximum number of users for %s has been reached') % \ - room_jid)) + if gc_control is None or gc_control.autorejoin is None: + # maximum user number reached + self.dispatch('ERROR', (_('Unable to join group chat'), + _('Maximum number of users for %s has been reached') % \ + room_jid)) elif (errcode == '401') or (errcon == 'not-authorized'): # password required to join self.dispatch('GC_PASSWORD_REQUIRED', (room_jid, nick))