mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-10 20:22:36 +01:00
Aka: Fix listCommands, which returned tuples instead of strings.
This commit is contained in:
parent
6cce96868e
commit
ba434b1896
@ -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):
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user