]> PatchyGit - patchyircd.git/commitdiff
don't send error on empty command
authorEgor <egor@patchysicp.xyz>
Fri, 3 Mar 2023 17:17:33 +0000 (19:17 +0200)
committerEgor <egor@patchysicp.xyz>
Fri, 3 Mar 2023 17:17:33 +0000 (19:17 +0200)
irc.c

diff --git a/irc.c b/irc.c
index 2806034..9c85300 100644 (file)
--- 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]);