From f802f779047732e6a762e9afe5c1c0d282b89c4d Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 16 Dec 2014 16:27:22 -0800 Subject: [PATCH] Aka: update listCommands override to only include built in cmds The old behavior is superseded by 'aka list'. This makes it easier for people to find Aka plugin's core commands, as 'list Aka' won't be filled with random, irrelevant alias definitions. --- plugins/Aka/plugin.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/Aka/plugin.py b/plugins/Aka/plugin.py index 2dc2f2d01..9a57d8dba 100644 --- a/plugins/Aka/plugin.py +++ b/plugins/Aka/plugin.py @@ -32,7 +32,6 @@ import re import os import sys import datetime -import operator import supybot.conf as conf import supybot.utils as utils @@ -397,11 +396,9 @@ class Aka(callbacks.Plugin): isCommand = isCommandMethod def listCommands(self): - channel = dynamic.channel or 'global' - return list(set(list(map(callbacks.formatCommand, - self._db.get_aka_list(channel) + - self._db.get_aka_list('global'))) + - ['add', 'remove', 'lock', 'unlock', 'importaliasdatabase'])) + commands = ['add', 'remove', 'lock', 'unlock', 'importaliasdatabase', + 'show', 'list', 'set'] + return commands def getCommand(self, args, check_other_plugins=True): canonicalName = callbacks.canonicalName