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.
This commit is contained in:
James Lu 2014-12-16 16:27:22 -08:00
parent fe778c60bf
commit f802f77904
1 changed files with 3 additions and 6 deletions

View File

@ -32,7 +32,6 @@ import re
import os import os
import sys import sys
import datetime import datetime
import operator
import supybot.conf as conf import supybot.conf as conf
import supybot.utils as utils import supybot.utils as utils
@ -397,11 +396,9 @@ class Aka(callbacks.Plugin):
isCommand = isCommandMethod isCommand = isCommandMethod
def listCommands(self): def listCommands(self):
channel = dynamic.channel or 'global' commands = ['add', 'remove', 'lock', 'unlock', 'importaliasdatabase',
return list(set(list(map(callbacks.formatCommand, 'show', 'list', 'set']
self._db.get_aka_list(channel) + return commands
self._db.get_aka_list('global'))) +
['add', 'remove', 'lock', 'unlock', 'importaliasdatabase']))
def getCommand(self, args, check_other_plugins=True): def getCommand(self, args, check_other_plugins=True):
canonicalName = callbacks.canonicalName canonicalName = callbacks.canonicalName