From: Egor Date: Fri, 3 Mar 2023 17:17:33 +0000 (+0200) Subject: don't send error on empty command X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=f09384fb1b6e3d9117ce8abeae12ab64dacef89e;p=patchyircd.git don't send error on empty command --- diff --git a/irc.c b/irc.c index 2806034..9c85300 100644 --- a/irc.c +++ b/irc.c @@ -184,7 +184,9 @@ int parsePacket(struct client_data *client) { int processPacket(struct client_data *client, char *source, char *command, int argc, char *args[]) { (void)source; databuf.len = 0; - if(strcmp(command, "PING") == 0) { + if(strcmp(command, "") == 0) { + return 0; + } else if(strcmp(command, "PING") == 0) { if (!args[0]) return err_needmoreparams(client, command), sendbuf(client), 0; msg_pong(args[0]);