diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-05-12 12:53:08 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-05-12 12:53:08 +0000 |
commit | ec8a168ef8178430a75ad51a56a47f11e01784d1 (patch) | |
tree | b65439d49db35167f65d9db22dcdaffbf4b2ade9 | |
parent | 63ab08bc2a9b5fd51373f7165bd8bd612a576da2 (diff) |
- 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
-rw-r--r-- | modules/core/m_error.c | 15 |
1 files 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); |