diff --git a/evennia/commands/cmdset.py b/evennia/commands/cmdset.py index 4a3562ca7a..a36eca8624 100644 --- a/evennia/commands/cmdset.py +++ b/evennia/commands/cmdset.py @@ -509,7 +509,14 @@ class CmdSet(with_metaclass(_CmdSetMeta, object)): """ cmd = self._instantiate(cmd) - self.commands = [oldcmd for oldcmd in self.commands if oldcmd != cmd] + if cmd.key.startswith("__"): + try: + ic = self.system_commands.index(cmd) + del self.system_commands[ic] + except ValueError: + pass + else: + self.commands = [oldcmd for oldcmd in self.commands if oldcmd != cmd] def get(self, cmd): """ diff --git a/evennia/commands/command.py b/evennia/commands/command.py index f1a0c9e77a..2e7212da97 100644 --- a/evennia/commands/command.py +++ b/evennia/commands/command.py @@ -200,7 +200,8 @@ class Command(with_metaclass(CommandMeta, object)): __eq__. """ try: - return not cmd.key in self._matcheset + return self._matchset.isdisjoint(cmd._matchset) + #return not cmd.key in self._matcheset except AttributeError: return not cmd in self._matchset