and not "/" in and "/" not in

This commit is contained in:
MarkusRost 2022-06-14 20:25:23 +00:00
parent d82e33366b
commit 37ad15e986
2 changed files with 4 additions and 2 deletions

View file

@ -13,4 +13,6 @@
# You should have received a copy of the GNU General Public License
# along with RcGcDw. If not, see <http://www.gnu.org/licenses/>.
import extensions.hooks.example_hook
#import extensions.hooks.example_hook
#import extensions.hooks.usertalk
#import extensions.hooks.edit_alerts

View file

@ -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])