Changed/fixed some issues with the command priorities that caused a lower-prio dynamically-created command to not properly be accounted for. Also changed the prio order for which of the cmdsets are used for checking the "duplicates" flag - it is now the new set being merged onto the new one (i.e. the priorotized) cmdset that must have this flag set in order for the result to have duplicates.

This commit is contained in:
Griatch 2013-07-01 14:30:17 +02:00
parent 1e6384e40c
commit 92339362ec
4 changed files with 90 additions and 78 deletions

View file

@ -136,14 +136,11 @@ class ChannelHandler(object):
and run self.update on the handler.
"""
# map the channel to a searchable command
cmd = ChannelCommand()
cmd.key = channel.key.strip().lower()
cmd.obj = channel
cmd = ChannelCommand(key=channel.key.strip().lower(),
aliases=channel.aliases if channel.aliases else [],
locks="cmd:all();%s" % channel.locks,
obj=channel)
cmd.__doc__= self._format_help(channel)
if channel.aliases:
cmd.aliases = channel.aliases
cmd.lock_storage = "cmd:all();%s" % channel.locks
cmd.lockhandler.reset()
self.cached_channel_cmds.append(cmd)
self.cached_cmdsets = {}