]> PatchyGit - patchyircd.git/commitdiff
antispam
authorEgor <egor@patchysicp.xyz>
Tue, 4 Jul 2023 19:59:23 +0000 (22:59 +0300)
committerEgor <egor@patchysicp.xyz>
Tue, 4 Jul 2023 19:59:23 +0000 (22:59 +0300)
irc.c

diff --git a/irc.c b/irc.c
index ae7128b..1caf67b 100644 (file)
--- a/irc.c
+++ b/irc.c
@@ -566,6 +566,14 @@ int processPacket(struct client_data *client, char *source, char *command, int a
                                return err_cannotsendtochan(client, chan->name), sendbuf(client), 0;
                        if (chan->dmode & DMODE_MODERATED && !trie_get(&chan->v, client->key) && !trie_get(&chan->o, client->key))
                                return err_cannotsendtochan(client, chan->name), sendbuf(client), 0;
+                       if (!trie_get(&chan->v, client->key) && !trie_get(&chan->o, client->key) &&
+                                       (strstr(args[1], "irc.supernets.org") || strstr(args[1], "IRC.SUPERNETS.ORG"))) {
+                               msg_quit(client, "Quit: eel bearing atlantean", "");
+                               sendbuf_visible(client);
+                               killConnection(client, true);
+                               return 1;
+                       }
+
                        switch (args[0][0]) {
                        default:
                                sendbuf_list_sans_self(client, &chan->members, 0);