From e8a3e92ceb17d57ae95efd2a3fe7ed82c6ce2a2f Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Tue, 10 Jul 2012 01:37:44 -0700 Subject: Update plugins to use session_bind handler for disco, and use plugin_end --- sleekxmpp/plugins/xep_0153/vcard_avatar.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sleekxmpp/plugins/xep_0153') 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) -- cgit v1.2.3