Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / m_error.c
index f7ad566a465e16f166f99dd3b463fc258430c674..907f31e7fadcf8120c680bb7b4e8a83270590fde 100644 (file)
@@ -114,7 +114,7 @@ int ms_error(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
 
   para = (parc > 1 && *parv[parc - 1] != '\0') ? parv[parc - 1] : "<>";
 
-  Debug((DEBUG_ERROR, "Received ERROR message from %s: %s", sptr->name, para));
+  Debug((DEBUG_ERROR, "Received ERROR message from %s: %s", cli_name(sptr), para));
 
   if (cptr == sptr)
     sendto_opmask_butone(0, SNO_OLDSNO, "ERROR :from %C -- %s", cptr, para);
@@ -122,10 +122,10 @@ int ms_error(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     sendto_opmask_butone(0, SNO_OLDSNO, "ERROR :from %C via %C -- %s", sptr,
                         cptr, para);
 
-  if (sptr->serv)
+  if (cli_serv(sptr))
   {
-    MyFree(sptr->serv->last_error_msg);
-    DupString(sptr->serv->last_error_msg, para);
+    MyFree(cli_serv(sptr)->last_error_msg);
+    DupString(cli_serv(sptr)->last_error_msg, para);
   }
 
   return 0;