summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0153/vcard_avatar.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-07-10 01:37:44 -0700
committerLance Stout <lancestout@gmail.com>2012-07-10 01:37:44 -0700
commite8a3e92ceb17d57ae95efd2a3fe7ed82c6ce2a2f (patch)
tree94429d10127c50478e656559a72d47539d12422c /sleekxmpp/plugins/xep_0153/vcard_avatar.py
parent5df3839b7a8b1a3ca47f057865a52fe7a3f30229 (diff)
downloadslixmpp-e8a3e92ceb17d57ae95efd2a3fe7ed82c6ce2a2f.tar.gz
slixmpp-e8a3e92ceb17d57ae95efd2a3fe7ed82c6ce2a2f.tar.bz2
slixmpp-e8a3e92ceb17d57ae95efd2a3fe7ed82c6ce2a2f.tar.xz
slixmpp-e8a3e92ceb17d57ae95efd2a3fe7ed82c6ce2a2f.zip
Update plugins to use session_bind handler for disco, and use plugin_end
Diffstat (limited to 'sleekxmpp/plugins/xep_0153/vcard_avatar.py')
-rw-r--r--sleekxmpp/plugins/xep_0153/vcard_avatar.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0153/vcard_avatar.py b/sleekxmpp/plugins/xep_0153/vcard_avatar.py
index 3f36d135..1e32595a 100644
--- a/sleekxmpp/plugins/xep_0153/vcard_avatar.py
+++ b/sleekxmpp/plugins/xep_0153/vcard_avatar.py
@@ -45,6 +45,15 @@ class XEP_0153(BasePlugin):
self.api.register(self._set_hash, 'set_hash', default=True)
self.api.register(self._get_hash, 'get_hash', default=True)
+ def plugin_end(self):
+ self.xmpp.del_filter('out', self._update_presence)
+ self.xmpp.del_event_handler('session_start', self._start)
+ self.xmpp.del_event_handler('presence_available', self._recv_presence)
+ self.xmpp.del_event_handler('presence_dnd', self._recv_presence)
+ self.xmpp.del_event_handler('presence_xa', self._recv_presence)
+ self.xmpp.del_event_handler('presence_chat', self._recv_presence)
+ self.xmpp.del_event_handler('presence_away', self._recv_presence)
+
def set_avatar(self, jid=None, avatar=None, mtype=None, block=True,
timeout=None, callback=None):
vcard = self.xmpp['xep_0054'].get_vcard(jid, cached=True)