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

Comparing ircd-hybrid/modules/core/m_error.c (file contents):
Revision 514 by michael, Sun Mar 5 08:30:18 2006 UTC vs.
Revision 515 by michael, Sun Mar 5 09:26:04 2006 UTC

# Line 25 | Line 25
25   #include "stdinc.h"
26   #include "handlers.h"
27   #include "client.h"
28 #include "common.h"   /* FALSE */
28   #include "ircd.h"
29   #include "send.h"
30   #include "msg.h"
31  
32 + static void m_error(struct Client *, struct Client *, int, char *[]);
33 +
34   struct Message error_msgtab = {
35   "ERROR", 0, 0, 1, 0, MFLG_SLOW | MFLG_UNREG, 0,
36 <  { m_error, m_ignore, ms_error, m_ignore, m_ignore, m_ignore }
36 >  { m_error, m_ignore, m_error, m_ignore, m_ignore, m_ignore }
37   };
38  
39   /*
# Line 47 | Line 48 | void
48   m_error(struct Client *client_p, struct Client *source_p,
49          int parc, char *parv[])
50   {
51 <  const char *para;
51 <
52 <  para = (parc > 1 && *parv[1] != '\0') ? parv[1] : "<>";
51 >  const char *para = (parc > 1 && *parv[1] != '\0') ? parv[1] : "<>";
52  
53    ilog(L_ERROR, "Received ERROR message from %s: %s",
54         source_p->name, para);
# Line 72 | Line 71 | m_error(struct Client *client_p, struct
71    if (MyClient(source_p))
72      exit_client(source_p, source_p, "ERROR");
73   }
75
76 void
77 ms_error(struct Client *client_p, struct Client *source_p,
78         int parc, char *parv[])
79 {
80  const char *para;
81
82  para = (parc > 1 && *parv[1] != '\0') ? parv[1] : "<>";
83
84  ilog(L_ERROR, "Received ERROR message from %s: %s",
85       source_p->name, para);
86
87  if (client_p == source_p)
88    sendto_realops_flags(UMODE_ALL, L_ALL,"ERROR :from %s -- %s",
89                         get_client_name(client_p, MASK_IP), para);
90  else
91    sendto_realops_flags(UMODE_ALL, L_ALL,"ERROR :from %s via %s -- %s", source_p->name,
92                         get_client_name(client_p, MASK_IP), para);
93 }
94

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines