summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0092
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-07-27 10:45:52 -0700
committerLance Stout <lancestout@gmail.com>2012-07-27 10:45:52 -0700
commitc2189b4ecd6b022ed9900a6f411bd7e9d57c47ce (patch)
tree88b7dabe06edbbfeb45403c06628230c18301458 /sleekxmpp/plugins/xep_0092
parentc9b2cf60431f415584c1d12a7855e0d2ac148ec4 (diff)
parente3fab66dfb27abdd8aa28a8d15367a490d4b42dd (diff)
downloadslixmpp-c2189b4ecd6b022ed9900a6f411bd7e9d57c47ce.tar.gz
slixmpp-c2189b4ecd6b022ed9900a6f411bd7e9d57c47ce.tar.bz2
slixmpp-c2189b4ecd6b022ed9900a6f411bd7e9d57c47ce.tar.xz
slixmpp-c2189b4ecd6b022ed9900a6f411bd7e9d57c47ce.zip
Merge branch 'master' into develop
Diffstat (limited to 'sleekxmpp/plugins/xep_0092')
-rw-r--r--sleekxmpp/plugins/xep_0092/version.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/sleekxmpp/plugins/xep_0092/version.py b/sleekxmpp/plugins/xep_0092/version.py
index 463da158..35813e1d 100644
--- a/sleekxmpp/plugins/xep_0092/version.py
+++ b/sleekxmpp/plugins/xep_0092/version.py
@@ -30,16 +30,18 @@ class XEP_0092(BasePlugin):
description = 'XEP-0092: Software Version'
dependencies = set(['xep_0030'])
stanza = stanza
+ default_config = {
+ 'software_name': 'SleekXMPP',
+ 'version': sleekxmpp.__version__,
+ 'os': ''
+ }
def plugin_init(self):
"""
Start the XEP-0092 plugin.
"""
- self.name = self.config.get('name', 'SleekXMPP')
- self.version = self.config.get('version', sleekxmpp.__version__)
- self.os = self.config.get('os', '')
-
- self.getVersion = self.get_version
+ if 'name' in self.config:
+ self.software_name = self.config['name']
self.xmpp.register_handler(
Callback('Software Version',
@@ -63,7 +65,7 @@ class XEP_0092(BasePlugin):
iq -- The Iq stanza containing the software version query.
"""
iq.reply()
- iq['software_version']['name'] = self.name
+ iq['software_version']['name'] = self.software_name
iq['software_version']['version'] = self.version
iq['software_version']['os'] = self.os
iq.send()
@@ -88,3 +90,6 @@ class XEP_0092(BasePlugin):
del values['lang']
return values
return False
+
+
+XEP_0092.getVersion = XEP_0092.get_version