add !alias list that displays the existing alias commands. limited utility, really.

This commit is contained in:
Brian S. Stephan 2010-09-08 20:12:19 -05:00
parent a7f0070a39
commit fd7834756b

View File

@ -51,6 +51,14 @@ class Alias(Module):
if self.config.remove_option(self.__class__.__name__, whats[2]): if self.config.remove_option(self.__class__.__name__, whats[2]):
replystr = 'removed alias ' + whats[2] replystr = 'removed alias ' + whats[2]
return self.reply(connection, replypath, replystr) return self.reply(connection, replypath, replystr)
elif whats[0] == '!alias' and whats[1] == 'list':
try:
alist = self.config.options(self.__class__.__name__)
self.remove_metaoptions(alist)
alist.sort()
liststr = ', '.join(alist)
return self.reply(connection, replypath, liststr)
except NoSectionError: pass
except NoOptionError: pass except NoOptionError: pass
except NoSectionError: pass except NoSectionError: pass