From 93594b8453626be4e7c620ee2ce1d3529ed8e66c Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 20 Apr 2014 17:35:16 +0200 Subject: Do not reload unaliased aliases TODO: implement the remove_option method from configparser --- plugins/alias.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/alias.py b/plugins/alias.py index e52c8d5f..490605e5 100644 --- a/plugins/alias.py +++ b/plugins/alias.py @@ -91,7 +91,8 @@ class Plugin(BasePlugin): """ for alias in self.config.options(): full = self.config.get(alias, '') - self.command_alias(alias + ' ' + full) + if full: + self.command_alias(alias + ' ' + full) def command_alias(self, line): """ @@ -128,6 +129,8 @@ class Plugin(BasePlugin): if alias in self.commands: del self.commands[alias] self.api.del_command(alias) + self.config.set(alias, '') + self.config.write() self.api.information('Alias /%s successfuly deleted' % alias, 'Info') def completion_unalias(self, the_input): -- cgit v1.2.3