# HG changeset patch # User Goffi # Date 1395665377 -3600 # Node ID cd150dd947e3e813d42bddd827aa44799dff9820 # Parent d609581bf74acab602e88da9d4ba0339d6aa9c78 plugin text-commands: fixed name conflicts management + plugin parrot: removed now done TODO diff -r d609581bf74a -r cd150dd947e3 src/plugins/plugin_exp_parrot.py --- a/src/plugins/plugin_exp_parrot.py Mon Mar 24 10:57:15 2014 +0100 +++ b/src/plugins/plugin_exp_parrot.py Mon Mar 24 13:49:37 2014 +0100 @@ -131,9 +131,6 @@ def cmd_parrot(self, mess_data, profile): """activate Parrot mode between 2 entities, in both directions.""" - #TODO: these commands must not be hardcoded, an interface should be made - # to allow plugins to register simple commands like this. - debug("Catched parrot command") txt_cmd = self.host.plugins[C.TEXT_CMDS] diff -r d609581bf74a -r cd150dd947e3 src/plugins/plugin_misc_text_commands.py --- a/src/plugins/plugin_misc_text_commands.py Mon Mar 24 10:57:15 2014 +0100 +++ b/src/plugins/plugin_misc_text_commands.py Mon Mar 24 13:49:37 2014 +0100 @@ -66,9 +66,9 @@ warning(_("Skipping cmd_ method")) if cmd_name in self._commands: suff=2 - while (cmd_name + suff) in self._commands: + while (cmd_name + str(suff)) in self._commands: suff+=1 - new_name = cmd_name + suff + new_name = cmd_name + str(suff) warning(_("Conflict for command [%(old_name)s], renaming it to [%(new_name)s]") % {'old_name': cmd_name, 'new_name': new_name}) cmd_name = new_name self._commands[cmd_name] = cmd