From: Egor Date: Sun, 8 May 2022 09:35:20 +0000 (+0300) Subject: fix infinite loop with MODE +o X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=82ceab7f7253253edddd77a46725bf9ae063f2e0;p=patchyircd.git fix infinite loop with MODE +o --- diff --git a/irc.c b/irc.c index 807097b..1f8af04 100644 --- a/irc.c +++ b/irc.c @@ -569,17 +569,17 @@ int processPacket(struct client_data *client, char *source, char *command, int a case 'v': case 'o': if(!*argp) - continue; + break; const char *nick = *argp++; char which[2] = {*p, 0}; struct client_data *cl = findClient(nick); if (!cl) { err_nosuchnick(client, nick), sendbuf(client); - continue; + break; } if (!trie_get(&chan->members, cl->key)) { err_usernotinchannel(client, cl->nick, chan), sendbuf(client); - continue; + break; } trie_set(*p == 'o' ? &chan->o : &chan->v, cl->key, is_plus ? cl : NULL, NULL); copy_strf(&databuf, ":%s!%s@%s MODE %s %s%s %s\r\n",