+2000-11-20 Kevin L. Mitchell <klmitch@mit.edu>
+
+ * ircd/ircd_reply.c (protocol_violation): rewrite
+ protocol_violation so it'll actually work
+
+ * ircd/m_motd.c (m_motd): Iso's addition of get_client_class(sptr)
+ resulted in core dumps if NODEFAULTMOTD is defined, because m_motd
+ gets called from register_user with a NULL sptr. This is probably
+ a design problem, but this bandaid will do for now...
+
2000-11-19 Isomer <isomer@coders.net>
* ircd/ircd_reply.c: added 'protocol_violation', thus alerting us
to problems in the server<->server protocol.
int protocol_violation(struct Client* cptr, const char* pattern, ...)
{
- va_list vl;
- char buffer[512];
- assert(pattern);
- assert(cptr);
- va_start(vl,pattern);
- ircd_snprintf(0,buffer,sizeof(buffer)-2,
- "Protocol Violation from %C: %v",vl);
- sendcmdto_flag_butone(&me, CMD_DESYNCH, NULL, FLAGS_DEBUG,
- ":%s", cptr, buffer);
- va_end(vl);
- return 0;
+ struct VarData vd;
+
+ assert(pattern);
+ assert(cptr);
+
+ vd.vd_format = pattern;
+ va_start(vd.vd_args, pattern);
+
+ sendcmdto_flag_butone(&me, CMD_DESYNCH, NULL, FLAGS_DEBUG,
+ ":Protocol Violation from %C: %v", cptr, &vd);
+
+ va_end(vd.vd_args);
+ return 0;
}
int need_more_params(struct Client* cptr, const char* cmd)