| 34 |
|
#include "ircd.h" |
| 35 |
|
#include "numeric.h" |
| 36 |
|
#include "s_log.h" |
| 37 |
– |
#include "s_stats.h" |
| 37 |
|
#include "send.h" |
| 38 |
|
#include "ircd_handler.h" |
| 39 |
|
#include "msg.h" |
| 244 |
|
*/ |
| 245 |
|
if (from == NULL) |
| 246 |
|
{ |
| 247 |
< |
ServerStats->is_unpf++; |
| 247 |
> |
++ServerStats.is_unpf; |
| 248 |
|
remove_unknown(client_p, sender, pbuffer); |
| 249 |
|
return; |
| 250 |
|
} |
| 253 |
|
|
| 254 |
|
if (from->from != client_p) |
| 255 |
|
{ |
| 256 |
< |
ServerStats->is_wrdi++; |
| 256 |
> |
++ServerStats.is_wrdi; |
| 257 |
|
cancel_clients(client_p, from, pbuffer); |
| 258 |
|
return; |
| 259 |
|
} |
| 265 |
|
|
| 266 |
|
if (*ch == '\0') |
| 267 |
|
{ |
| 268 |
< |
ServerStats->is_empt++; |
| 268 |
> |
++ServerStats.is_empt; |
| 269 |
|
return; |
| 270 |
|
} |
| 271 |
|
|
| 283 |
|
mptr = NULL; |
| 284 |
|
numeric = ch; |
| 285 |
|
paramcount = MAXPARA; |
| 286 |
< |
ServerStats->is_num++; |
| 286 |
> |
++ServerStats.is_num; |
| 287 |
|
s = ch + 3; /* I know this is ' ' from above if */ |
| 288 |
|
*s++ = '\0'; /* blow away the ' ', and point s to next part */ |
| 289 |
|
} |
| 313 |
|
me.name, from->name, ch); |
| 314 |
|
} |
| 315 |
|
|
| 316 |
< |
ServerStats->is_unco++; |
| 316 |
> |
++ServerStats.is_unco; |
| 317 |
|
return; |
| 318 |
|
} |
| 319 |
|
|
| 458 |
|
|
| 459 |
|
mtree_p->links++; /* Have new pointer, so up ref count */ |
| 460 |
|
} |
| 461 |
+ |
|
| 462 |
|
add_msg_element(ntree_p, msg_p, cmd+1); |
| 463 |
|
} |
| 464 |
|
} |
| 506 |
|
if ((ntree_p = mtree_p->pointers[*cmd & (MAXPTRLEN-1)]) != NULL) |
| 507 |
|
{ |
| 508 |
|
del_msg_element(ntree_p, cmd+1); |
| 509 |
+ |
|
| 510 |
|
if (ntree_p->links == 0) |
| 511 |
|
{ |
| 512 |
|
mtree_p->pointers[*cmd & (MAXPTRLEN-1)] = NULL; |
| 590 |
|
struct Message * |
| 591 |
|
find_command(const char *cmd) |
| 592 |
|
{ |
| 593 |
< |
return(msg_tree_parse(cmd, &msg_tree)); |
| 593 |
> |
return msg_tree_parse(cmd, &msg_tree); |
| 594 |
|
} |
| 595 |
|
|
| 596 |
|
/* report_messages() |
| 606 |
|
int i; |
| 607 |
|
|
| 608 |
|
for (i = 0; i < MAXPTRLEN; i++) |
| 608 |
– |
{ |
| 609 |
|
if (mtree->pointers[i] != NULL) |
| 610 |
|
recurse_report_messages(source_p, mtree->pointers[i]); |
| 611 |
– |
} |
| 611 |
|
} |
| 612 |
|
|
| 613 |
|
static void |
| 616 |
|
int i; |
| 617 |
|
|
| 618 |
|
if (mtree->msg != NULL) |
| 620 |
– |
{ |
| 619 |
|
sendto_one(source_p, form_str(RPL_STATSCOMMANDS), |
| 620 |
|
me.name, source_p->name, mtree->msg->cmd, |
| 621 |
|
mtree->msg->count, mtree->msg->bytes, |
| 622 |
|
mtree->msg->rcount); |
| 625 |
– |
} |
| 623 |
|
|
| 624 |
|
for (i = 0; i < MAXPTRLEN; i++) |
| 628 |
– |
{ |
| 625 |
|
if (mtree->pointers[i] != NULL) |
| 626 |
|
recurse_report_messages(source_p, mtree->pointers[i]); |
| 631 |
– |
} |
| 627 |
|
} |
| 628 |
|
|
| 629 |
|
/* cancel_clients() |
| 666 |
|
sendto_realops_flags(UMODE_DEBUG, L_ALL, |
| 667 |
|
"Not dropping server %s (%s) for Fake Direction", |
| 668 |
|
client_p->name, source_p->name); |
| 669 |
< |
return(-1); |
| 669 |
> |
return -1; |
| 670 |
|
/* return exit_client(client_p, client_p, &me, "Fake Direction");*/ |
| 671 |
|
} |
| 672 |
|
|
| 688 |
|
source_p->name, source_p->username, source_p->host, |
| 689 |
|
source_p->from->name, get_client_name(client_p, MASK_IP)); |
| 690 |
|
|
| 691 |
< |
return(0); |
| 691 |
> |
return 0; |
| 692 |
|
} |
| 693 |
|
|
| 694 |
|
/* remove_unknown() |