diff --git a/plugins/Aka/plugin.py b/plugins/Aka/plugin.py index f9e770a75..7e47879b5 100644 --- a/plugins/Aka/plugin.py +++ b/plugins/Aka/plugin.py @@ -507,8 +507,12 @@ class Aka(callbacks.Plugin): lock = ' ' + _('Locked by %s at %s') % (locked_by, locked_at) else: lock = '' - doc = format(_('\n\nAlias for %q.%s'), - flexargs, (biggestDollar, _('argument')), original, lock) + if channel == 'global': + doc = format(_('\n\nAlias for %q.%s'), + flexargs, (biggestDollar, _('argument')), original, lock) + else: + doc = format(_('\n\nAlias for %q.%s'), + channel, flexargs, (biggestDollar, _('argument')), original, lock) f = utils.python.changeFunctionName(f, name, doc) return f diff --git a/plugins/Aka/test.py b/plugins/Aka/test.py index 50ed3e79f..c12bdc7cb 100644 --- a/plugins/Aka/test.py +++ b/plugins/Aka/test.py @@ -71,6 +71,12 @@ class AkaChannelTestCase(ChannelPluginTestCase): self.assertNotError('aka add nonascii echo éé') self.assertRegexp('help nonascii', "Alias for .*echo éé") + self.assertNotError('aka remove slashdot') + self.assertNotError('aka add --channel %s slashdot foo' % self.channel) + self.assertRegexp('help aka slashdot', "an alias on %s.*Alias for .*foo" + % self.channel) + self.assertNotError('aka remove --channel %s slashdot' % self.channel) + def testShow(self): self.assertNotError('aka add foo bar') self.assertResponse('show foo', 'bar $*') @@ -211,7 +217,7 @@ class AkaTestCase(PluginTestCase): self.assertNotError('register evil_admin foo') self.assertNotError('aka add slashdot foo') - self.assertRegexp('help aka slashdot', "Alias for .*foo") + self.assertRegexp('help aka slashdot', "a global alias.*Alias for .*foo") self.assertNotRegexp('help aka slashdot', 'Locked by') self.assertNotError('aka lock slashdot') self.assertRegexp('help aka slashdot', 'Locked by evil_admin')