Changes related to abuse filters and them being possibly public

This commit is contained in:
Frisk 2018-12-20 15:46:01 +01:00
parent b87248adac
commit d5dbb70c14
No known key found for this signature in database
GPG key ID: 0E9A7D3C0A01586C

View file

@ -409,8 +409,11 @@ def webhook_formatter(action, STATIC, **params):
link = "https://{wiki}.gamepedia.com/Special:RecentChanges".format(wiki=settings["wiki"]) link = "https://{wiki}.gamepedia.com/Special:RecentChanges".format(wiki=settings["wiki"])
embed["title"] = _("Imported interwiki") embed["title"] = _("Imported interwiki")
elif action == "abusefilter/modify": elif action == "abusefilter/modify":
link = "https://{wiki}.gamepedia.com/Special:RecentChanges".format(wiki=settings["wiki"]) link = "https://{wiki}.gamepedia.com/Special:AbuseFilter/history/{number}/diff/prev/{historyid}".format(wiki=settings["wiki"], number=params["filternr"], historyid=params["historyid"])
embed["title"] = _("Edited abuse filter number {number}").format(number=params["filternr"]) embed["title"] = _("Edited abuse filter number {number}").format(number=params["filternr"])
elif action == "abusefilter/create":
link = "https://{wiki}.gamepedia.com/Special:AbuseFilter/{number}".format(wiki=settings["wiki"], number=params["filternr"])
embed["title"] = _("Created abuse filter number {number}").format(number=params["filternr"])
elif action == "merge/merge": elif action == "merge/merge":
link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"], link = "https://{wiki}.gamepedia.com/{article}".format(wiki=settings["wiki"],
article=params["title"].replace(" ", "_")) article=params["title"].replace(" ", "_"))
@ -621,6 +624,9 @@ def first_pass(
webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment, webhook_formatter(combination, STATIC_VARS, user=change["user"], title=change["title"], desc=parsedcomment,
old_groups=change["logparams"]["oldgroups"], new_groups=change["logparams"]["newgroups"]) old_groups=change["logparams"]["oldgroups"], new_groups=change["logparams"]["newgroups"])
elif combination == "abusefilter/modify": elif combination == "abusefilter/modify":
webhook_formatter(combination, STATIC_VARS, user=change["user"], desc=parsedcomment,
filternr=change["logparams"]['newId'], historyid=change["logparams"]["historyId"])
elif combination == "abusefilter/create":
webhook_formatter(combination, STATIC_VARS, user=change["user"], desc=parsedcomment, webhook_formatter(combination, STATIC_VARS, user=change["user"], desc=parsedcomment,
filternr=change["logparams"]['newId']) filternr=change["logparams"]['newId'])
elif combination == "interwiki/iw_add": elif combination == "interwiki/iw_add":