summaryrefslogtreecommitdiff
path: root/src/connection.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-01-17 17:37:06 +0100
committermathieui <mathieui@mathieui.net>2013-01-17 17:37:06 +0100
commitc5cc462963363b2307a2a341da170829385a9589 (patch)
tree7a93dec042fef00865dab70320ed4cb8f560a9e9 /src/connection.py
parentb06240ee7b4940af52a0c01915214860d8a06bb2 (diff)
downloadpoezio-c5cc462963363b2307a2a341da170829385a9589.tar.gz
poezio-c5cc462963363b2307a2a341da170829385a9589.tar.bz2
poezio-c5cc462963363b2307a2a341da170829385a9589.tar.xz
poezio-c5cc462963363b2307a2a341da170829385a9589.zip
Move to the upstream SleekXMPP
- remove the decline command that is not in the trunk (and mediated declines are supported nowhere anyway) - change a bit xhtml-im support - change the bookmarks management a bit - Add a verification to avoid crashing when poezio will be launched the next time - Fix the (unrelated) bug when setting a jid affiliation
Diffstat (limited to 'src/connection.py')
-rw-r--r--src/connection.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/connection.py b/src/connection.py
index 16fb798d..b33e0aab 100644
--- a/src/connection.py
+++ b/src/connection.py
@@ -16,6 +16,7 @@ from gettext import (bindtextdomain, textdomain, bind_textdomain_codeset,
gettext as _)
import getpass
+import sys
import sleekxmpp
from config import config, options
@@ -58,13 +59,26 @@ class Connection(sleekxmpp.ClientXMPP):
self.whitespace_keepalive_interval = int(interval)
else:
self.whitespace_keepalive_interval = 300
+ # Hack to check the sleekxmpp version
+ # TODO: Remove that when a sufficient time has passed since the move
+ try:
+ self.register_plugin('xep_0071')
+ wrong_version = True
+ except:
+ wrong_version = False
+ finally:
+ if wrong_version:
+ print("You are using the wrong sleekxmpp version. Please run "
+ "update.sh again or install the corresponding "
+ "sleekxmpp package.")
+ sys.exit()
+
self.register_plugin('xep_0012')
self.register_plugin('xep_0030')
self.register_plugin('xep_0004')
self.register_plugin('xep_0045')
self.register_plugin('xep_0060')
self.register_plugin('xep_0048')
- self.register_plugin('xep_0071')
self.register_plugin('xep_0085')
self.register_plugin('xep_0191')
if config.get('send_poezio_info', 'true') == 'true':