X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/8ac75529832a07c76478f08552034f8f3380309b..af81d5a0b09446188fd6f9c292b51519f2c1cedd:/src/parse.c diff --git a/src/parse.c b/src/parse.c index 78353ac..3b5cd27 100644 --- a/src/parse.c +++ b/src/parse.c @@ -63,8 +63,6 @@ static void do_alias(struct alias_entry *, struct Client *, char *); 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 */ @@ -135,7 +133,7 @@ parse(struct Client *client_p, char *pbuffer, char *bufend) 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; @@ -218,7 +216,7 @@ parse(struct Client *client_p, char *pbuffer, char *bufend) 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) @@ -475,7 +473,7 @@ report_messages(struct Client *source_p) 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, @@ -484,7 +482,7 @@ report_messages(struct Client *source_p) 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, @@ -602,10 +600,10 @@ do_numeric(char numeric[], struct Client *client_p, struct Client *source_p, int int tl; /* current length of presently being built string in t */ for (i = 2; i < (parc - 1); i++) { - tl = ircsprintf(t, " %s", parv[i]); + tl = rb_sprintf(t, " %s", parv[i]); t += tl; } - ircsprintf(t, " :%s", parv[parc - 1]); + rb_sprintf(t, " :%s", parv[parc - 1]); } if((target_p = find_client(parv[1])) != NULL) @@ -660,9 +658,9 @@ do_numeric(char numeric[], struct Client *client_p, struct Client *source_p, int 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)