Can now pass a name to add_handler so that the handler can be reliably removed later.

Updated uses of add_handler to include a name.
This commit is contained in:
Lance Stout
2010-07-19 19:19:33 -04:00
parent fec8578cf6
commit b5a14a0190
8 changed files with 24 additions and 19 deletions

View File

@@ -29,7 +29,7 @@ class old_0004(base.base_plugin):
def plugin_init(self):
self.xep = '0004'
self.description = '*Deprecated Data Forms'
self.xmpp.add_handler("<message><x xmlns='jabber:x:data' /></message>", self.handler_message_xform)
self.xmpp.add_handler("<message><x xmlns='jabber:x:data' /></message>", self.handler_message_xform, name='Old Message Form')
def post_init(self):
base.base_plugin.post_init(self)