summaryrefslogtreecommitdiff
path: root/src/connection.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2011-01-09 00:09:51 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2011-01-09 00:09:51 +0000
commitcfc33090098ced22e18cfcbcbe25dab17d2b4a70 (patch)
tree334dae3be620e5f8116e80fe033f81d7d5b15688 /src/connection.py
parent8017b2d9f1eceaf31aa95f87ee356ab8c114cde3 (diff)
downloadpoezio-cfc33090098ced22e18cfcbcbe25dab17d2b4a70.tar.gz
poezio-cfc33090098ced22e18cfcbcbe25dab17d2b4a70.tar.bz2
poezio-cfc33090098ced22e18cfcbcbe25dab17d2b4a70.tar.xz
poezio-cfc33090098ced22e18cfcbcbe25dab17d2b4a70.zip
restaure software version and local time
Diffstat (limited to 'src/connection.py')
-rw-r--r--src/connection.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/connection.py b/src/connection.py
index 66ae9e55..0373c4e7 100644
--- a/src/connection.py
+++ b/src/connection.py
@@ -29,6 +29,7 @@ import sleekxmpp
from config import config
from logger import logger
+import common
class Connection(sleekxmpp.ClientXMPP):
"""
@@ -48,8 +49,16 @@ class Connection(sleekxmpp.ClientXMPP):
jid = '%s/%s' % (config.get('server', 'anon.louiz.org'), resource)
password = None
sleekxmpp.ClientXMPP.__init__(self, jid, password, ssl=True)
- self.registerPlugin('xep_0030')
- self.registerPlugin('xep_0045')
+ self.register_plugin('xep_0030')
+ self.register_plugin('xep_0045')
+ if config.get('send_poezio_info', 'true') == 'true':
+ info = {'name':'poezio',
+ 'version':'0.7-dev'}
+ if config.get('send_os_info', 'true') == 'true':
+ info['os'] = common.get_os_info()
+ self.register_plugin('xep_0092', pconfig=info)
+ if config.get('send_time', 'true') == 'true':
+ self.register_plugin('xep_0202')
def start(self):
# TODO, try multiple servers