summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
authorNathan Fritz <nathan@andyet.net>2010-05-27 01:51:51 +0800
committerThom Nichols <tmnichols@gmail.com>2010-06-01 22:07:51 +0800
commita2719b0bb0d4ac26f30c462e6eebb32965637d34 (patch)
treeefff1e464a619bb95b693c615b0ee67c84a37ef9 /sleekxmpp/plugins
parent71ad715caaeb43517e5175380d3256d8a8cf1141 (diff)
downloadslixmpp-a2719b0bb0d4ac26f30c462e6eebb32965637d34.tar.gz
slixmpp-a2719b0bb0d4ac26f30c462e6eebb32965637d34.tar.bz2
slixmpp-a2719b0bb0d4ac26f30c462e6eebb32965637d34.tar.xz
slixmpp-a2719b0bb0d4ac26f30c462e6eebb32965637d34.zip
plugins now are checked for post_init having ran when process() is called
Diffstat (limited to 'sleekxmpp/plugins')
-rw-r--r--sleekxmpp/plugins/base.py3
-rw-r--r--sleekxmpp/plugins/xep_0004.py1
-rw-r--r--sleekxmpp/plugins/xep_0009.py1
-rw-r--r--sleekxmpp/plugins/xep_0050.py1
-rw-r--r--sleekxmpp/plugins/xep_0092.py1
-rw-r--r--sleekxmpp/plugins/xep_0199.py1
6 files changed, 7 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/base.py b/sleekxmpp/plugins/base.py
index 685833f4..4223646a 100644
--- a/sleekxmpp/plugins/base.py
+++ b/sleekxmpp/plugins/base.py
@@ -24,6 +24,7 @@ class base_plugin(object):
self.description = 'Base Plugin'
self.xmpp = xmpp
self.config = config
+ self.post_inited = False
self.enable = config.get('enable', True)
if self.enable:
self.plugin_init()
@@ -32,4 +33,4 @@ class base_plugin(object):
pass
def post_init(self):
- pass
+ self.post_inited = True
diff --git a/sleekxmpp/plugins/xep_0004.py b/sleekxmpp/plugins/xep_0004.py
index 24ffa978..56d18929 100644
--- a/sleekxmpp/plugins/xep_0004.py
+++ b/sleekxmpp/plugins/xep_0004.py
@@ -31,6 +31,7 @@ class xep_0004(base.base_plugin):
self.xmpp.add_handler("<message><x xmlns='jabber:x:data' /></message>", self.handler_message_xform)
def post_init(self):
+ base.base_plugin.post_init(self)
self.xmpp.plugin['xep_0030'].add_feature('jabber:x:data')
def handler_message_xform(self, xml):
diff --git a/sleekxmpp/plugins/xep_0009.py b/sleekxmpp/plugins/xep_0009.py
index 403f94b9..49ffac41 100644
--- a/sleekxmpp/plugins/xep_0009.py
+++ b/sleekxmpp/plugins/xep_0009.py
@@ -185,6 +185,7 @@ class xep_0009(base.base_plugin):
self.activeCalls = []
def post_init(self):
+ base.base_plugin.post_init(self)
self.xmpp.plugin['xep_0030'].add_feature('jabber:iq:rpc')
self.xmpp.plugin['xep_0030'].add_identity('automatition','rpc')
diff --git a/sleekxmpp/plugins/xep_0050.py b/sleekxmpp/plugins/xep_0050.py
index 0ca66ddb..2f356e17 100644
--- a/sleekxmpp/plugins/xep_0050.py
+++ b/sleekxmpp/plugins/xep_0050.py
@@ -42,6 +42,7 @@ class xep_0050(base.base_plugin):
self.sd = self.xmpp.plugin['xep_0030']
def post_init(self):
+ base.base_plugin.post_init(self)
self.sd.add_feature('http://jabber.org/protocol/commands')
def addCommand(self, node, name, form, pointer=None, multi=False):
diff --git a/sleekxmpp/plugins/xep_0092.py b/sleekxmpp/plugins/xep_0092.py
index ca0d7e17..aeebbe0c 100644
--- a/sleekxmpp/plugins/xep_0092.py
+++ b/sleekxmpp/plugins/xep_0092.py
@@ -33,6 +33,7 @@ class xep_0092(base.base_plugin):
self.xmpp.add_handler("<iq type='get' xmlns='%s'><query xmlns='jabber:iq:version' /></iq>" % self.xmpp.default_ns, self.report_version)
def post_init(self):
+ base.base_plugin.post_init(self)
self.xmpp.plugin['xep_0030'].add_feature('jabber:iq:version')
def report_version(self, xml):
diff --git a/sleekxmpp/plugins/xep_0199.py b/sleekxmpp/plugins/xep_0199.py
index 9b10b927..ccaf0b3a 100644
--- a/sleekxmpp/plugins/xep_0199.py
+++ b/sleekxmpp/plugins/xep_0199.py
@@ -35,6 +35,7 @@ class xep_0199(base.base_plugin):
#self.xmpp.add_event_handler('session_start', self.handler_pingserver, threaded=True)
def post_init(self):
+ base.base_plugin.post_init(self)
self.xmpp.plugin['xep_0030'].add_feature('http://www.xmpp.org/extensions/xep-0199.html#ns')
def handler_pingserver(self, xml):