From 37ad15e986223c77bd78060a9da737552755bcb9 Mon Sep 17 00:00:00 2001 From: MarkusRost <2701034-MarkusRost@users.noreply.gitlab.com> Date: Tue, 14 Jun 2022 20:25:23 +0000 Subject: [PATCH] and not "/" in and "/" not in --- extensions/hooks/__init__.py | 4 +++- extensions/hooks/usertalk.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/hooks/__init__.py b/extensions/hooks/__init__.py index 669ca03..727931b 100644 --- a/extensions/hooks/__init__.py +++ b/extensions/hooks/__init__.py @@ -13,4 +13,6 @@ # You should have received a copy of the GNU General Public License # along with RcGcDw. If not, see . -import extensions.hooks.example_hook \ No newline at end of file +#import extensions.hooks.example_hook +#import extensions.hooks.usertalk +#import extensions.hooks.edit_alerts diff --git a/extensions/hooks/usertalk.py b/extensions/hooks/usertalk.py index f23a58a..1576676 100644 --- a/extensions/hooks/usertalk.py +++ b/extensions/hooks/usertalk.py @@ -38,7 +38,7 @@ def add_mention(message, userid): def usertalk_hook(message, metadata, context, change): if not discord_users: return - if context.feed_type in ["recentchanges", "abuselog"] and change["ns"] in [2, 3, 202, 1200] and not "/" in change["title"]: + if context.feed_type in ["recentchanges", "abuselog"] and change["ns"] in [2, 3, 202, 1200] and "/" not in change["title"]: username = change["title"].split(':', 1)[1] if discord_users.get(username, "") and username != change["user"]: add_mention(message, discord_users[username])