Fix getSpecific usage

The channel and network arguments were incorrectly swapped
This commit is contained in:
Tasos Sahanidis 2020-01-12 03:45:50 +02:00 committed by Valentin Lorentz
parent 0fccea30ce
commit 7bd68df8aa
2 changed files with 3 additions and 3 deletions

View File

@ -155,7 +155,7 @@ class Misc(callbacks.Plugin):
return return
# Now, for normal handling. # Now, for normal handling.
if conf.supybot.reply.whenNotCommand.getSpecific( if conf.supybot.reply.whenNotCommand.getSpecific(
channel, irc.network)(): irc.network, channel)():
if len(tokens) >= 2: if len(tokens) >= 2:
cb = irc.getCallback(tokens[0]) cb = irc.getCallback(tokens[0])
if cb: if cb:
@ -179,7 +179,7 @@ class Misc(callbacks.Plugin):
if channel != irc.nick else _('private')) if channel != irc.nick else _('private'))
if irc.nested: if irc.nested:
bracketConfig = conf.supybot.commands.nested.brackets bracketConfig = conf.supybot.commands.nested.brackets
brackets = bracketConfig.getSpecific(channel, irc.network)() brackets = bracketConfig.getSpecific(irc.network, channel)()
if brackets: if brackets:
(left, right) = brackets (left, right) = brackets
irc.reply(left + ' '.join(tokens) + right) irc.reply(left + ' '.join(tokens) + right)

View File

@ -1188,7 +1188,7 @@ class Banmask(registry.SpaceSeparatedSetOfStrings):
bhost = '*' bhost = '*'
if not options: if not options:
options = supybot.protocols.irc.banmask.getSpecific( options = supybot.protocols.irc.banmask.getSpecific(
channel, network)() network, channel)()
for option in options: for option in options:
if option == 'nick': if option == 'nick':
bnick = nick bnick = nick