Treat G-line-related times as network times, rather than local times.
[ircu2.10.12-pk.git] / ircd / ircd_reply.c
index 440d84ab4b95856de36dd31dc9d2b12d79b34d84..256d18c5047c92f2ad5521eabca98ecce2f3b6f0 100644 (file)
@@ -29,6 +29,7 @@
 #include "ircd_reply.h"
 #include "client.h"
 #include "ircd.h"
+#include "ircd_log.h"
 #include "ircd_snprintf.h"
 #include "msg.h"
 #include "msgq.h"
@@ -37,7 +38,7 @@
 #include "s_debug.h"
 #include "send.h"
 
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
 #include <string.h>
 
 /** Report a protocol violation warning to anyone listening.  This can
 int protocol_violation(struct Client* cptr, const char* pattern, ...)
 {
   struct VarData vd;
+  char message[BUFSIZE];
 
   assert(pattern);
   assert(cptr);
 
   vd.vd_format = pattern;
   va_start(vd.vd_args, pattern);
-
-  sendwallto_group_butone(&me, WALL_DESYNCH, NULL,
-                       "Protocol Violation from %s: %v", cli_name(cptr), &vd);
-
+  ircd_snprintf(NULL, message, sizeof(message),
+                "Protocol Violation from %s: %v", cli_name(cptr), &vd);
   va_end(vd.vd_args);
+
+  sendwallto_group_butone(&me, WALL_DESYNCH, NULL, "%s", message);
   return 0;
 }