示例#1
0
  def removeCommand(self, name):
    """
    Removes a command (and the help text) for whatever reasons.

    @param name: the name of the command to remove
    @type  name: string

    @return: 0 if no command was found, 1 if the command was removed
        succesfully.
    @rtype: boolean
    """
    if self._commands.has_key(name):
      cd = self._commands[name]
      del self._commands[name]
      try:
        exported.remove_help(cd.getFQN())
      except:
        pass
      return 1
    return 0
示例#2
0
    def removeCommand(self, name):
        """
    Removes a command (and the help text) for whatever reasons.

    @param name: the name of the command to remove
    @type  name: string

    @return: 0 if no command was found, 1 if the command was removed
        succesfully.
    @rtype: boolean
    """
        if self._commands.has_key(name):
            cd = self._commands[name]
            del self._commands[name]
            try:
                exported.remove_help(cd.getFQN())
            except:
                pass
            return 1
        return 0
示例#3
0
def unload():
    modutils.unload_commands(commands_dict.keys())
    exported.remove_help("root.commands.ifvar")
示例#4
0
def load():
    modutils.load_commands(commands_dict)
    exported.add_help("root.commands.ifvar", ifvar_help)
    exported.remove_help("root.ifvar")
示例#5
0
def unload():
	exported.hook_unregister("from_mud_hook", handle_from_mud)
	modutils.unload_commands(commands_dict.keys())
	exported.remove_help("root.commands.commo")
示例#6
0
def load():
	exported.hook_register("from_mud_hook", handle_from_mud)
	modutils.load_commands(commands_dict)
	exported.add_help("root.commands.commo", commo_help)
	exported.remove_help("root.commo")
示例#7
0
def unload():
	modutils.unload_commands(commands_dict.keys())
	exported.remove_help("root.commands.ifvar")
示例#8
0
def load():
	modutils.load_commands(commands_dict)
	exported.add_help("root.commands.ifvar", ifvar_help)
	exported.remove_help("root.ifvar")