summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0224/attention.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-03-12 00:32:39 -0700
committerLance Stout <lancestout@gmail.com>2012-03-12 19:32:20 -0700
commit87d6ade06d0c51245e2dc4292f5dfb802f98d453 (patch)
treeea1308e6209908bbd6f2efe88b1e5bd410a8a0b2 /sleekxmpp/plugins/xep_0224/attention.py
parent4a009515c1675e8f1ce8003707e71d7377bc4192 (diff)
downloadslixmpp-87d6ade06d0c51245e2dc4292f5dfb802f98d453.tar.gz
slixmpp-87d6ade06d0c51245e2dc4292f5dfb802f98d453.tar.bz2
slixmpp-87d6ade06d0c51245e2dc4292f5dfb802f98d453.tar.xz
slixmpp-87d6ade06d0c51245e2dc4292f5dfb802f98d453.zip
Move XEP-0224 to new system.
Diffstat (limited to 'sleekxmpp/plugins/xep_0224/attention.py')
-rw-r--r--sleekxmpp/plugins/xep_0224/attention.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/sleekxmpp/plugins/xep_0224/attention.py b/sleekxmpp/plugins/xep_0224/attention.py
index 4a3ff368..6eea5d9d 100644
--- a/sleekxmpp/plugins/xep_0224/attention.py
+++ b/sleekxmpp/plugins/xep_0224/attention.py
@@ -12,25 +12,26 @@ from sleekxmpp.stanza import Message
from sleekxmpp.xmlstream import register_stanza_plugin
from sleekxmpp.xmlstream.handler import Callback
from sleekxmpp.xmlstream.matcher import StanzaPath
-from sleekxmpp.plugins.base import base_plugin
+from sleekxmpp.plugins import BasePlugin
from sleekxmpp.plugins.xep_0224 import stanza
log = logging.getLogger(__name__)
-class xep_0224(base_plugin):
+class XEP_0224(BasePlugin):
"""
XEP-0224: Attention
"""
+ name = 'xep_0224'
+ description = 'XEP-0224: Attention'
+ dependencies = set(['xep_0030'])
+ stanza = stanza
+
def plugin_init(self):
"""Start the XEP-0224 plugin."""
- self.xep = '0224'
- self.description = 'Attention'
- self.stanza = stanza
-
register_stanza_plugin(Message, stanza.Attention)
self.xmpp.register_handler(
@@ -38,9 +39,6 @@ class xep_0224(base_plugin):
StanzaPath('message/attention'),
self._handle_attention))
- def post_init(self):
- """Handle cross-plugin dependencies."""
- base_plugin.post_init(self)
self.xmpp['xep_0030'].add_feature(stanza.Attention.namespace)
def request_attention(self, to, mfrom=None, mbody=''):