Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MacFan4000 committed Aug 14, 2020
1 parent 97d6042 commit 3ba8ff6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions MirahezeBots/plugins/wikimgnt.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def checkAccess(acldata, requestdata,):
return False


def blockManager(type, sender, iswikifarm, domain, logininfo, trigger, acl=False):
def blockManager(type, sender, iswikifarm, domain, logininfo, bot, trigger, acl=False):
FARMSYNTAX = "Syntax: .{} wiki user reason".format(type)
SYNTAX = "Syntax: .{} user reason".format(type)
try:
Expand Down Expand Up @@ -179,9 +179,9 @@ def deletepage(bot, trigger):
def blockuser(bot, trigger):
"""Block the given user indefinitely (depending on config, on the given wiki)"""
if bot.settings.wikimgnt.wiki_acl:
replytext = blockManager("block", [trigger.nick, trigger.account], bot.settings.wikimgnt.wiki_farm, bot.settings.wikimgnt.wiki_domain, [bot.settings.wikimgnt.bot_username, bot.settings.wikimgnt.bot_password], trigger, bot.settings.wikimgnt.wiki_acl)
replytext = blockManager("block", [trigger.nick, trigger.account], bot.settings.wikimgnt.wiki_farm, bot.settings.wikimgnt.wiki_domain, [bot.settings.wikimgnt.bot_username, bot.settings.wikimgnt.bot_password], bot, trigger, bot.settings.wikimgnt.wiki_acl)
else:
replytext = blockManager("block", [trigger.nick, trigger.account], bot.settings.wikimgnt.wiki_farm, bot.settings.wikimgnt.wiki_domain, [bot.settings.wikimgnt.bot_username, bot.settings.wikimgnt.bot_password], trigger)
replytext = blockManager("block", [trigger.nick, trigger.account], bot.settings.wikimgnt.wiki_farm, bot.settings.wikimgnt.wiki_domain, [bot.settings.wikimgnt.bot_username, bot.settings.wikimgnt.bot_password], bot, trigger)
bot.reply(replytext)


Expand All @@ -191,9 +191,9 @@ def blockuser(bot, trigger):
def unblockuser(bot, trigger):
"""Unblock the given user (depending on config, on the given wiki)"""
if bot.settings.wikimgnt.wiki_acl:
replytext = blockManager("unblock", [trigger.nick, trigger.account], bot.settings.wikimgnt.wiki_farm, bot.settings.wikimgnt.wiki_domain, [bot.settings.wikimgnt.bot_username, bot.settings.wikimgnt.bot_password, ], trigger, bot.settings.wikimgnt.wiki_acl)
replytext = blockManager("unblock", [trigger.nick, trigger.account], bot.settings.wikimgnt.wiki_farm, bot.settings.wikimgnt.wiki_domain, [bot.settings.wikimgnt.bot_username, bot.settings.wikimgnt.bot_password, ], bot, trigger, bot.settings.wikimgnt.wiki_acl)
else:
replytext = blockManager("unblock", [trigger.nick, trigger.account], bot.settings.wikimgnt.wiki_farm, bot.settings.wikimgnt.wiki_domain, [bot.settings.wikimgnt.bot_username, bot.settings.wikimgnt.bot_password], trigger)
replytext = blockManager("unblock", [trigger.nick, trigger.account], bot.settings.wikimgnt.wiki_farm, bot.settings.wikimgnt.wiki_domain, [bot.settings.wikimgnt.bot_username, bot.settings.wikimgnt.bot_password], bot, trigger)
bot.reply(replytext)


Expand Down

1 comment on commit 3ba8ff6

@RhinosF1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Err, no. We don't pass bot anymore outside of @command/@rule

Please sign in to comment.