-#include <assert.h>
-
-/*
- * ms_error - server message handler
- *
- * parv[0] = sender prefix
- * parv[parc-1] = text
- */
-int ms_error(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
-{
- char *para;
-
- para = (parc > 1 && *parv[parc - 1] != '\0') ? parv[parc - 1] : "<>";
-
- 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...
- */
- if (IsUser(cptr))
- return 0;
- if (IsUnknown(cptr))
- return exit_client_msg(cptr, cptr, &me, "Register first");
-
- if (cptr == sptr)
- sendto_ops("ERROR :from %s -- %s", cptr->name, para);
- else
- sendto_ops("ERROR :from %s via %s -- %s", sptr->name, cptr->name, para);
-
- if (sptr->serv)
- {
- MyFree(sptr->serv->last_error_msg);
- DupString(sptr->serv->last_error_msg, para);
- }
-
- return 0;
-}