mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Fix link for IP range blocks
This commit is contained in:
parent
4bb16f6c1b
commit
083ab1637d
|
@ -598,6 +598,7 @@ def embed_block_block(ctx: Context, change: dict):
|
|||
embed = DiscordMessage(ctx.message_type, ctx.event, ctx.webhook_url)
|
||||
user = change["title"].split(':', 1)[1]
|
||||
try:
|
||||
if "/" not in user:
|
||||
ipaddress.ip_address(user)
|
||||
embed["url"] = ctx.client.create_article_path("Special:Contributions/{user}".format(user=user))
|
||||
except ValueError:
|
||||
|
@ -645,6 +646,7 @@ def compact_block_block(ctx: Context, change: dict):
|
|||
author, author_url = compact_author(ctx, change)
|
||||
parsed_comment = compact_summary(ctx)
|
||||
try:
|
||||
if "/" not in user:
|
||||
ipaddress.ip_address(user)
|
||||
link = clean_link(ctx.client.create_article_path("Special:Contributions/{user}".format(user=user)))
|
||||
except ValueError:
|
||||
|
|
Loading…
Reference in a new issue