diff --git a/src/s_serv.c b/src/s_serv.c index 1121ec042..8f3a73e8d 100644 --- a/src/s_serv.c +++ b/src/s_serv.c @@ -503,17 +503,22 @@ CMD_FUNC(m_error) Debug((DEBUG_ERROR, "Received ERROR message from %s: %s", sptr->name, para)); - /* - ** Ignore error messages generated by normal user clients - ** (because ill-behaving user clients would flood opers - ** screen otherwise). Pass ERROR's from other sources to - ** the local operator... + + /* Errors from untrusted sources only go to the junk snomask + * (which is only for debugging issues and such). + * This to prevent flooding and confusing IRCOps by + * malicious users. */ - if (IsPerson(cptr) || IsUnknown(cptr)) + if (!IsServer(cptr) && !cptr->serv) + { + sendto_snomask(SNO_JUNK, "ERROR from %s -- %s", + get_client_name(cptr, FALSE), para); return 0; + } + if (cptr == sptr) { - sendto_umode_global(UMODE_OPER, "ERROR :from %s -- %s", + sendto_umode_global(UMODE_OPER, "ERROR from %s -- %s", get_client_name(cptr, FALSE), para); } else