]> jfr.im git - irc/freenode/ircd-seven.git/commitdiff
add #defines for nick,user,host
authorEd Kellett <redacted>
Fri, 10 Aug 2018 14:04:32 +0000 (15:04 +0100)
committerEd Kellett <redacted>
Fri, 17 Aug 2018 11:31:29 +0000 (12:31 +0100)
modules/m_filter.c

index 3e21115986f482d94a6d426d88cd8d09e93d1a4c..60cf3e1cdefef292dbc18855afb3113350f8e0ca 100644 (file)
 #include <hs_common.h>
 #include <hs_runtime.h>
 
+#define FILTER_NICK     0
+#define FILTER_USER     0
+#define FILTER_HOST     0
+
 static void filter_msg_user(void *data);
 static void filter_msg_channel(void *data);
 static void on_client_exit(void *data);
@@ -309,7 +313,21 @@ filter_msg_user(void *data_)
        strip_colour(text);
        strip_unprintable(text);
        snprintf(check_buffer, sizeof check_buffer, ":%s!%s@%s#%c %s 0 :%s",
-                s->name, s->username, s->host,
+#if FILTER_NICK
+                s->name,
+#else
+                "*",
+#endif
+#if FILTER_USER
+                s->username,
+#else
+                "*",
+#endif
+#if FILTER_HOST
+                s->host,
+#else
+                "*",
+#endif
                 s->user && s->user->suser[0] != '\0' ? '1' : '0',
                 cmdname[data->msgtype],
                 text);
@@ -346,7 +364,21 @@ filter_msg_channel(void *data_)
        strip_colour(text);
        strip_unprintable(text);
        snprintf(check_buffer, sizeof check_buffer, ":%s!%s@%s#%c %s %s :%s",
-                s->name, s->username, s->host,
+#if FILTER_NICK
+                s->name,
+#else
+                "*",
+#endif
+#if FILTER_USER
+                s->username,
+#else
+                "*",
+#endif
+#if FILTER_HOST
+                s->host,
+#else
+                "*",
+#endif
                 s->user && s->user->suser[0] != '\0' ? '1' : '0',
                 cmdname[data->msgtype],
                 data->chptr->chname,