mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Forgot chanPlugin. Yay, PyChecker.
This commit is contained in:
parent
d762c1e8c8
commit
b3169b7c54
@ -296,10 +296,10 @@ def tokenize(s, brackets=None, channel=None):
|
|||||||
tokens = brackets
|
tokens = brackets
|
||||||
if conf.channelValue(conf.supybot.reply.pipeSyntax, channel):
|
if conf.channelValue(conf.supybot.reply.pipeSyntax, channel):
|
||||||
tokens = '%s|' % tokens
|
tokens = '%s|' % tokens
|
||||||
|
log.stat('tokenize took %s seconds.' % (time.time() - start))
|
||||||
return Tokenizer(tokens).tokenize(s)
|
return Tokenizer(tokens).tokenize(s)
|
||||||
except ValueError, e:
|
except ValueError, e:
|
||||||
raise SyntaxError, str(e)
|
raise SyntaxError, str(e)
|
||||||
log.stat('tokenize took %s seconds.' % (time.time() - start))
|
|
||||||
|
|
||||||
def getCommands(tokens):
|
def getCommands(tokens):
|
||||||
"""Given tokens as output by tokenize, returns the command names."""
|
"""Given tokens as output by tokenize, returns the command names."""
|
||||||
@ -360,7 +360,7 @@ def checkCommandCapability(msg, cb, command):
|
|||||||
chanCommand = ircdb.makeChannelCapability(channel, command)
|
chanCommand = ircdb.makeChannelCapability(channel, command)
|
||||||
chanPluginCommand = ircdb.makeChannelCapability(channel,
|
chanPluginCommand = ircdb.makeChannelCapability(channel,
|
||||||
pluginCommand)
|
pluginCommand)
|
||||||
checkAtEnd += [chanCommand, chanPluginCommand]
|
checkAtEnd += [chanCommand, chanPlugin, chanPluginCommand]
|
||||||
default &= ircdb.channels.getChannel(channel).defaultAllow
|
default &= ircdb.channels.getChannel(channel).defaultAllow
|
||||||
return not (default or \
|
return not (default or \
|
||||||
any(lambda x: ircdb.checkCapability(msg.prefix, x),
|
any(lambda x: ircdb.checkCapability(msg.prefix, x),
|
||||||
|
Loading…
Reference in New Issue
Block a user