From ba434b18962750c90e5a14cd7eb240bc8627c4f1 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Thu, 1 Aug 2013 10:44:19 +0200 Subject: [PATCH] Aka: Fix listCommands, which returned tuples instead of strings. --- plugins/Aka/plugin.py | 5 +++-- plugins/Aka/test.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/Aka/plugin.py b/plugins/Aka/plugin.py index dc0a5aaf0..f46be734f 100644 --- a/plugins/Aka/plugin.py +++ b/plugins/Aka/plugin.py @@ -242,8 +242,9 @@ class Aka(callbacks.Plugin): def listCommands(self): channel = dynamic.channel or 'global' - return list(set(self._db.get_aka_list(channel) + - self._db.get_aka_list('global') + + return list(set(map(callbacks.formatCommand, + self._db.get_aka_list(channel) + + self._db.get_aka_list('global')) + self.__parent.listCommands())) def getCommand(self, args): diff --git a/plugins/Aka/test.py b/plugins/Aka/test.py index 94b873569..844004e60 100644 --- a/plugins/Aka/test.py +++ b/plugins/Aka/test.py @@ -106,6 +106,7 @@ class AkaChannelTestCase(ChannelPluginTestCase): cb._add_aka('global', 'foobar', 'echo sbbone') cb._db.lock_aka('global', 'foobar', 'evil_admin') self.assertResponse('foobar', 'sbbone') + self.assertRegexp('list Aka', 'foobar') self.assertRaises(Aka.AkaError, cb._remove_aka, 'global', 'foobar') cb._remove_aka('global', 'foobar', evenIfLocked=True) self.assertNotRegexp('list Aka', 'foobar')