30 |
|
#include "log.h" |
31 |
|
#include "parse.h" |
32 |
|
#include "irc_string.h" |
33 |
+ |
#include "memory.h" |
34 |
|
|
35 |
|
|
36 |
|
/* |
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; |
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 |
|
|