'Cleanup plugin state, and prepare for plugin removal.
Also removes required event handlers.'

def _end(self):

    if (self.xmpp is not None):
        self.xmpp.del_event_handler('session_bind', self.session_bind)
    self.plugin_end()
    log.debug(('Disabled    Plugin:    %s' % self.description))
