From 5293e8dc2454e39d84783aa2835dcf17df7407a1 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Thu, 6 Jan 2011 22:08:23 -0600 Subject: [PATCH] add support for listing one alias via list, which shows the value --- modules/Alias.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/Alias.py b/modules/Alias.py index f5e6339..e2104b7 100644 --- a/modules/Alias.py +++ b/modules/Alias.py @@ -53,11 +53,15 @@ class Alias(Module): 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) + if len(whats) > 2: + alias = self.config.get(self.__class__.__name__, whats[2]) + return self.reply(connection, replypath, alias) + else: + 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 NoSectionError: pass