static int handle_command(struct Message *, struct Client *, struct Client *, int, const char**);
-static int cmd_hash(const char *p);
-
static char buffer[1024];
/* turn a string into a parc/parv pair */
struct Message *mptr;
s_assert(MyConnect(client_p));
- s_assert(client_p->localClient->fd >= 0);
+ s_assert(client_p->localClient->F->fd >= 0);
if(IsAnyDead(client_p))
return;
if((s = strchr(ch, ' ')))
*s++ = '\0';
- mptr = irc_dictionary_retrieve(cmd_dict, mptr);
+ mptr = irc_dictionary_retrieve(cmd_dict, ch);
/* no command or its encap only, error */
if(!mptr || !mptr->cmd)
struct Message *msg;
struct alias_entry *amsg;
- IRC_DICTIONARY_FOREACH(msg, &iter, cmd_dict)
+ DICTIONARY_FOREACH(msg, &iter, cmd_dict)
{
s_assert(msg->cmd != NULL);
sendto_one_numeric(source_p, RPL_STATSCOMMANDS,
msg->bytes, msg->rcount);
}
- IRC_DICTIONARY_FOREACH(amsg, &iter, alias_dict)
+ DICTIONARY_FOREACH(amsg, &iter, alias_dict)
{
s_assert(amsg->name != NULL);
sendto_one_numeric(source_p, RPL_STATSCOMMANDS,
return;
}
else if((chptr = find_channel(parv[1])) != NULL)
- sendto_channel_local(ALL_MEMBERS, chptr,
- ":%s %s %s %s",
- source_p->name, numeric, chptr->chname, buffer);
+ sendto_channel_flags(client_p, ALL_MEMBERS, source_p, chptr,
+ "%s %s%s",
+ numeric, chptr->chname, buffer);
}
static void do_alias(struct alias_entry *aptr, struct Client *source_p, char *text)