Commit 93594b84 authored by mathieui's avatar mathieui

Do not reload unaliased aliases

TODO: implement the remove_option method from configparser
parent 36224436
...@@ -91,6 +91,7 @@ class Plugin(BasePlugin): ...@@ -91,6 +91,7 @@ class Plugin(BasePlugin):
""" """
for alias in self.config.options(): for alias in self.config.options():
full = self.config.get(alias, '') full = self.config.get(alias, '')
if full:
self.command_alias(alias + ' ' + full) self.command_alias(alias + ' ' + full)
def command_alias(self, line): def command_alias(self, line):
...@@ -128,6 +129,8 @@ class Plugin(BasePlugin): ...@@ -128,6 +129,8 @@ class Plugin(BasePlugin):
if alias in self.commands: if alias in self.commands:
del self.commands[alias] del self.commands[alias]
self.api.del_command(alias) self.api.del_command(alias)
self.config.set(alias, '')
self.config.write()
self.api.information('Alias /%s successfuly deleted' % alias, 'Info') self.api.information('Alias /%s successfuly deleted' % alias, 'Info')
def completion_unalias(self, the_input): def completion_unalias(self, the_input):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment