mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-10-12 06:47:21 +02: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)
|
Raise=True)
|
||||||
channel = arg
|
channel = arg
|
||||||
aka_list = self._db.get_aka_list(channel)
|
aka_list = self._db.get_aka_list(channel)
|
||||||
|
if aka_list:
|
||||||
aka_values = [self._db.get_alias(channel, aka) for aka in 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
|
s = ('{0}: "{1}"'.format(ircutils.bold(k), v) for (k, v) in
|
||||||
zip(aka_list, aka_values))
|
zip(aka_list, aka_values))
|
||||||
irc.replies(s)
|
irc.replies(s)
|
||||||
|
else:
|
||||||
|
irc.error(_("No Akas found."))
|
||||||
list = wrap(list, [getopts({'channel': 'somethingWithoutSpaces'})])
|
list = wrap(list, [getopts({'channel': 'somethingWithoutSpaces'})])
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user