summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0050/adhoc.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-03-11 21:20:05 -0700
committerLance Stout <lancestout@gmail.com>2012-03-12 19:32:19 -0700
commitad8fd91b7ac1a111b4f54991a2f7544fcca315aa (patch)
tree01b08f0c0172146e6675dc90b7cab654081610ce /sleekxmpp/plugins/xep_0050/adhoc.py
parent1f5a3a444521e67afc7036cfd8f8e98fee982141 (diff)
downloadslixmpp-ad8fd91b7ac1a111b4f54991a2f7544fcca315aa.tar.gz
slixmpp-ad8fd91b7ac1a111b4f54991a2f7544fcca315aa.tar.bz2
slixmpp-ad8fd91b7ac1a111b4f54991a2f7544fcca315aa.tar.xz
slixmpp-ad8fd91b7ac1a111b4f54991a2f7544fcca315aa.zip
Move XEP-0050 to new system.
Diffstat (limited to 'sleekxmpp/plugins/xep_0050/adhoc.py')
-rw-r--r--sleekxmpp/plugins/xep_0050/adhoc.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/sleekxmpp/plugins/xep_0050/adhoc.py b/sleekxmpp/plugins/xep_0050/adhoc.py
index ec7b7041..2c6cfd6e 100644
--- a/sleekxmpp/plugins/xep_0050/adhoc.py
+++ b/sleekxmpp/plugins/xep_0050/adhoc.py
@@ -14,7 +14,7 @@ from sleekxmpp.exceptions import IqError
from sleekxmpp.xmlstream.handler import Callback
from sleekxmpp.xmlstream.matcher import StanzaPath
from sleekxmpp.xmlstream import register_stanza_plugin, JID
-from sleekxmpp.plugins.base import base_plugin
+from sleekxmpp.plugins import BasePlugin
from sleekxmpp.plugins.xep_0050 import stanza
from sleekxmpp.plugins.xep_0050 import Command
from sleekxmpp.plugins.xep_0004 import Form
@@ -23,7 +23,7 @@ from sleekxmpp.plugins.xep_0004 import Form
log = logging.getLogger(__name__)
-class xep_0050(base_plugin):
+class XEP_0050(BasePlugin):
"""
XEP-0050: Ad-Hoc Commands
@@ -78,12 +78,13 @@ class xep_0050(base_plugin):
terminate_command -- Command user API: delete a command's session
"""
+ name = 'xep_0050'
+ description = 'XEP-0050: Ad-Hoc Commands'
+ dependencies = set(['xep_0030', 'xep_0004'])
+ stanza = stanza
+
def plugin_init(self):
"""Start the XEP-0050 plugin."""
- self.xep = '0050'
- self.description = 'Ad-Hoc Commands'
- self.stanza = stanza
-
self.threaded = self.config.get('threaded', True)
self.commands = {}
self.sessions = self.config.get('session_db', {})
@@ -109,9 +110,6 @@ class xep_0050(base_plugin):
self._handle_command_complete,
threaded=self.threaded)
- def post_init(self):
- """Handle cross-plugin interactions."""
- base_plugin.post_init(self)
self.xmpp['xep_0030'].add_feature(Command.namespace)
def set_backend(self, db):
@@ -369,7 +367,6 @@ class xep_0050(base_plugin):
del self.sessions[sessionid]
-
# =================================================================
# Client side (command user) API