From f09384fb1b6e3d9117ce8abeae12ab64dacef89e Mon Sep 17 00:00:00 2001 From: Egor Date: Fri, 3 Mar 2023 19:17:33 +0200 Subject: [PATCH] don't send error on empty command --- irc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]); -- 2.56.0