'The method to call if adding a new command to the session, the requred parameters of cmddisco and cmdexecute are the methods to enable that command to be executed'

def addCommand(self, name, cmddisco, cmdexecute, jid=''):

    if (not self._handlers.has_key(jid)):
        self._handlers[jid] = {}
        self._browser.setDiscoHandler(self._DiscoHandler, node=NS_COMMANDS, jid=jid)
    if self._handlers[jid].has_key(name):
        raise NameError, 'Command    Exists'
    else:
        self._handlers[jid][name] = {'disco': cmddisco, 'execute': cmdexecute}
    self._browser.setDiscoHandler(cmddisco, node=name, jid=jid)
