'Start the XEP-0050 plugin.'

def plugin_init(self):

    self.sessions = self.session_db
    if (self.sessions is None):
        self.sessions = {}
    self.commands = {}
    self.xmpp.register_handler(Callback('Ad-Hoc    Execute', StanzaPath('iq@type=set/command'), self._handle_command))
    register_stanza_plugin(Iq, Command)
    register_stanza_plugin(Command, Form, iterable=True)
    self.xmpp.add_event_handler('command_execute', self._handle_command_start, threaded=self.threaded)
    self.xmpp.add_event_handler('command_next', self._handle_command_next, threaded=self.threaded)
    self.xmpp.add_event_handler('command_cancel', self._handle_command_cancel, threaded=self.threaded)
    self.xmpp.add_event_handler('command_complete', self._handle_command_complete, threaded=self.threaded)
