Log message:
Apply a bandaid to Iso's m_motd change; rewrite protocol_violation so that
it actually works
Testing done: Tested BURST with too few arguments--produced correct
behavior. Am able to connect to the server as a user without coring
it :)
Status: Stable
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@310
c9e4aea6-c8fd-4c43-8297-
357d70d61c8c
+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.
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, ...)
{
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)
}
int need_more_params(struct Client* cptr, const char* cmd)
struct TRecord *ptr;
int count;
struct MotdItem *temp;
struct TRecord *ptr;
int count;
struct MotdItem *temp;
- int class = get_client_class(sptr);
+ int class = get_client_class(cptr);
#ifdef NODEFAULTMOTD
int no_motd;
#ifdef NODEFAULTMOTD
int no_motd;