317 |
{ |
{ |
318 |
if (!IsServer(client_p)) |
if (!IsServer(client_p)) |
319 |
{ |
{ |
320 |
sendto_one(client_p, form_str(ERR_NEEDMOREPARAMS), |
sendto_one(client_p, form_str(ERR_NEEDMOREPARAMS), me.name, |
321 |
me.name, EmptyString(hpara[0]) ? "*" : hpara[0], mptr->cmd); |
EmptyString(hpara[0]) ? "*" : hpara[0], mptr->cmd); |
322 |
} |
} |
323 |
else |
else |
324 |
{ |
{ |
357 |
* in the parent. |
* in the parent. |
358 |
*/ |
*/ |
359 |
static void |
static void |
360 |
add_msg_element(struct MessageTree *mtree_p, |
add_msg_element(struct MessageTree *mtree_p, struct Message *msg_p, |
361 |
struct Message *msg_p, const char *cmd) |
const char *cmd) |
362 |
{ |
{ |
363 |
struct MessageTree *ntree_p; |
struct MessageTree *ntree_p; |
364 |
|
|
365 |
if (*cmd == '\0') |
if (*cmd == '\0') |
366 |
{ |
{ |
367 |
mtree_p->msg = msg_p; |
mtree_p->msg = msg_p; |
368 |
mtree_p->links++; /* Have msg pointer, so up ref count */ |
mtree_p->links++; /* Have msg pointer, so up ref count */ |
369 |
} |
} |
370 |
else |
else |
371 |
{ |
{ |
380 |
ntree_p = MyMalloc(sizeof(struct MessageTree)); |
ntree_p = MyMalloc(sizeof(struct MessageTree)); |
381 |
mtree_p->pointers[*cmd & (MAXPTRLEN - 1)] = ntree_p; |
mtree_p->pointers[*cmd & (MAXPTRLEN - 1)] = ntree_p; |
382 |
|
|
383 |
mtree_p->links++; /* Have new pointer, so up ref count */ |
mtree_p->links++; /* Have new pointer, so up ref count */ |
384 |
} |
} |
385 |
|
|
386 |
add_msg_element(ntree_p, msg_p, cmd + 1); |
add_msg_element(ntree_p, msg_p, cmd + 1); |
433 |
|
|
434 |
if (ntree_p->links == 0) |
if (ntree_p->links == 0) |
435 |
{ |
{ |
436 |
mtree_p->pointers[*cmd & (MAXPTRLEN - 1)] = NULL; |
mtree_p->pointers[*cmd & (MAXPTRLEN - 1)] = NULL; |
437 |
mtree_p->links--; |
mtree_p->links--; |
438 |
MyFree(ntree_p); |
MyFree(ntree_p); |
439 |
} |
} |
440 |
} |
} |
441 |
} |
} |
717 |
|
|
718 |
if ((num != ERR_NOSUCHNICK)) |
if ((num != ERR_NOSUCHNICK)) |
719 |
sendto_realops_flags(UMODE_ALL, L_ADMIN, |
sendto_realops_flags(UMODE_ALL, L_ADMIN, |
720 |
"*** %s(via %s) sent a %s numeric to me: %s", |
"*** %s(via %s) sent a %s numeric to me: %s", |
721 |
source_p->name, client_p->name, numeric, buffer); |
source_p->name, client_p->name, numeric, buffer); |
722 |
return; |
return; |
723 |
} |
} |
724 |
else if (target_p->from == client_p) |
else if (target_p->from == client_p) |
743 |
return; |
return; |
744 |
} |
} |
745 |
else if ((chptr = hash_find_channel(parv[1])) != NULL) |
else if ((chptr = hash_find_channel(parv[1])) != NULL) |
746 |
sendto_channel_local(ALL_MEMBERS, 0, chptr, |
sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s %s %s %s", |
747 |
":%s %s %s %s", |
source_p->name, |
748 |
source_p->name, |
numeric, chptr->chname, buffer); |
|
numeric, chptr->chname, buffer); |
|
749 |
} |
} |
750 |
|
|
751 |
/* m_not_oper() |
/* m_not_oper() |