summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins
diff options
context:
space:
mode:
authorNathan Fritz <nathan@andyet.net>2010-05-26 10:51:51 -0700
committerNathan Fritz <nathan@andyet.net>2010-05-26 10:51:51 -0700
commitf4bc9d9722ea57b5f5d22efeb6bc65cb990e1053 (patch)
tree0b10ae2046996ce19efc29a701fc4cb9ed86c2d1 /sleekxmpp/plugins
parent9cfe19c1e14f7045684ed523b65cdbdf3ab48b2e (diff)
downloadslixmpp-f4bc9d9722ea57b5f5d22efeb6bc65cb990e1053.tar.gz
slixmpp-f4bc9d9722ea57b5f5d22efeb6bc65cb990e1053.tar.bz2
slixmpp-f4bc9d9722ea57b5f5d22efeb6bc65cb990e1053.tar.xz
slixmpp-f4bc9d9722ea57b5f5d22efeb6bc65cb990e1053.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):