From 2b5624a80eeef4eb6e3366f1770ce56c57d687a9 Mon Sep 17 00:00:00 2001 From: "yakumo.izuru" Date: Fri, 3 Nov 2023 01:00:37 +0000 Subject: [PATCH] filter all discord urls, add repo trigger Signed-off-by: Izuru Yakumo git-svn-id: file:///srv/svn/repo/chen/trunk@28 32723744-9b23-0b4a-b1da-9b2e968f9461 --- .gitignore | 1 + main.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2fa7ce7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +config.ini diff --git a/main.py b/main.py index 3444631..c730536 100644 --- a/main.py +++ b/main.py @@ -142,8 +142,14 @@ class ChenBot(ClientXMPP): return if "#nospoil" in msg["body"].lower(): return - if "cdn.discordapp.com" in msg["body"].lower(): + if "discord.com" in msg["body"].lower(): msg.reply("Ew, discord! :<\n").send() + if "discord.gg" in msg["body"].lower(): + msg.reply("Do you really want to invite someone to Hell? [meow in disarray]\n").send() + if "cdn.discordapp.com" in msg["body"].lower(): + msg.reply("Use a proper media host nya\n").send() + if "!repo" in msg["body"].lower(): + msg.reply("https://git.chaotic.ninja/yakumo.izuru/chen\n").send() for u in urls: if u in self.messages[sender]["links"]: continue