mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
Aka: catch with error if 'aka list' response is empty
This commit is contained in:
parent
f05f04807d
commit
26df32086d
@ -723,10 +723,13 @@ class Aka(callbacks.Plugin):
|
||||
Raise=True)
|
||||
channel = arg
|
||||
aka_list = self._db.get_aka_list(channel)
|
||||
if aka_list:
|
||||
aka_values = [self._db.get_alias(channel, aka) for aka in aka_list]
|
||||
s = ('{0}: "{1}"'.format(ircutils.bold(k), v) for (k, v) in
|
||||
zip(aka_list, aka_values))
|
||||
irc.replies(s)
|
||||
else:
|
||||
irc.error(_("No Akas found."))
|
||||
list = wrap(list, [getopts({'channel': 'somethingWithoutSpaces'})])
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user