From ec8a168ef8178430a75ad51a56a47f11e01784d1 Mon Sep 17 00:00:00 2001 From: michael Date: Sun, 12 May 2013 12:53:08 +0000 Subject: - mr_error(): ignore error if it's not a connecting/handshaking server git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2009 82007160-df01-0410-b94d-b575c5fd34c7 --- modules/core/m_error.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/core/m_error.c b/modules/core/m_error.c index 096538e..bdba169 100644 --- a/modules/core/m_error.c +++ b/modules/core/m_error.c @@ -29,6 +29,7 @@ #include "modules.h" #include "log.h" #include "parse.h" +#include "irc_string.h" /* @@ -42,9 +43,12 @@ static void m_error(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { - const char *para; + const char *para = (parc > 1 && !EmptyString(parv[1])) ? parv[1] : "<>"; - para = (parc > 1 && *parv[1] != '\0') ? parv[1] : "<>"; + assert(source_p == client_p); + + if (!IsHandshake(source_p) && !IsConnecting(source_p)) + return; ilog(LOG_TYPE_IRCD, "Received ERROR message from %s: %s", source_p->name, para); @@ -67,18 +71,13 @@ m_error(struct Client *client_p, struct Client *source_p, "ERROR :from %s via %s -- %s", source_p->name, get_client_name(client_p, MASK_IP), para); } - - if (MyClient(source_p)) - exit_client(source_p, source_p, "ERROR"); } static void ms_error(struct Client *client_p, struct Client *source_p, int parc, char *parv[]) { - const char *para; - - para = (parc > 1 && *parv[1] != '\0') ? parv[1] : "<>"; + const char *para = (parc > 1 && !EmptyString(parv[1])) ? parv[1] : "<>"; ilog(LOG_TYPE_IRCD, "Received ERROR message from %s: %s", source_p->name, para); -- cgit