ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/branches/newio/modules/core/m_error.c
(Generate patch)

Comparing branches/newio/modules/core/m_error.c (file contents):
Revision 2438 by michael, Sun Jul 21 18:11:50 2013 UTC vs.
Revision 2439 by michael, Sat Aug 3 18:35:17 2013 UTC

# Line 30 | Line 30
30   #include "log.h"
31   #include "parse.h"
32   #include "irc_string.h"
33 + #include "memory.h"
34  
35  
36   /*
# Line 53 | Line 54 | mr_error(struct Client *client_p, struct
54    ilog(LOG_TYPE_IRCD, "Received ERROR message from %s: %s",
55         source_p->name, para);
56  
57 <  if (client_p == source_p)
58 <  {
59 <    sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
60 <                         "ERROR :from %s -- %s",
61 <                         get_client_name(client_p, HIDE_IP), para);
62 <    sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
63 <                         "ERROR :from %s -- %s",
64 <                         get_client_name(client_p, MASK_IP), para);
64 <  }
65 <  else
57 >  sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
58 >                       "ERROR :from %s -- %s",
59 >                       get_client_name(source_p, HIDE_IP), para);
60 >  sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
61 >                       "ERROR :from %s -- %s",
62 >                       get_client_name(source_p, MASK_IP), para);
63 >
64 >  if (source_p->serv)
65    {
66 <    sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE,
67 <                         "ERROR :from %s via %s -- %s",
69 <                         source_p->name, get_client_name(client_p, HIDE_IP), para);
70 <    sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE,
71 <                         "ERROR :from %s via %s -- %s",
72 <                         source_p->name, get_client_name(client_p, MASK_IP), para);
66 >    MyFree(source_p->serv->last_error_msg);
67 >    source_p->serv->last_error_msg = xstrdup(para);
68    }
69  
70    return 0;
# Line 93 | Line 88 | ms_error(struct Client *client_p, struct
88                           "ERROR :from %s via %s -- %s",
89                           source_p->name,
90                           get_client_name(client_p, MASK_IP), para);
91 +
92 +  if (source_p->serv)
93 +  {
94 +    MyFree(source_p->serv->last_error_msg);
95 +    source_p->serv->last_error_msg = xstrdup(para);
96 +  }
97 +
98    return 0;
99   }
100  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines