Check for and use appropriate type of variadic macro arguments.
[srvx.git] / src / mod-blacklist.c
index cfaeb5d300a46ba5975136fcc65aa556cbc280ad..0e8efbefbf9aa4bc77d6ac9e320b88db1d045aee 100644 (file)
@@ -52,7 +52,11 @@ static struct {
     unsigned long gline_duration;
 } conf;
 
-#define blacklist_debug(format...) do { if (conf.debug_bot && conf.debug_channel) send_channel_notice(conf.debug_channel , conf.debug_bot , ## format); } while (0)
+#if defined(GCC_VARMACROS)
+# define blacklist_debug(ARGS...) do { if (conf.debug_bot && conf.debug_channel) send_channel_notice(conf.debug_channel, conf.debug_bot, ARGS); } while (0)
+#elif defined(C99_VARMACROS)
+# define blacklist_debug(...) do { if (conf.debug_bot && conf.debug_channel) send_channel_notice(conf.debug_channel, conf.debug_bot, __VA_ARGS__); } while (0)
+#endif
 
 static void
 do_expandos(char *output, unsigned int out_len, const char *input, ...)
@@ -166,6 +170,10 @@ blacklist_check_user(struct userNode *user)
     char ip[IRC_NTOP_MAX_SIZE];
     char dnsbl_target[128];
 
+    /* Users added during burst should not be checked. */
+    if (user->uplink->burst)
+        return 0;
+
     /* Users with bogus IPs are probably service bots. */
     if (!irc_in_addr_is_valid(user->ip))
         return 0;