summaryrefslogtreecommitdiff
path: root/message.c
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2020-10-22 01:00:09 +0100
committerLuke Bratch <luke@bratch.co.uk>2020-10-22 01:00:09 +0100
commit678411cc64c1a619ccc228028fbee0788f1e5ffd (patch)
tree0f5c72a40d3671ba5088fe0805cc14c74abc346d /message.c
parent80881f04e70b1708a303ae71774b87301f8deb38 (diff)
Send fully formed PONG responses to client PINGs, particularly relevant after server timeouts/reconnects e.g. for XChat.
Diffstat (limited to 'message.c')
-rw-r--r--message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/message.c b/message.c
index d0c5fed..6c8f5fc 100644
--- a/message.c
+++ b/message.c
@@ -1078,7 +1078,7 @@ int processclientmessage(SSL *server_ssl, char *str, struct client *clients, int
debugprint(DEBUG_FULL, "Client PING found and it is: %s with length %zd! Sending response...\n", tokens[0], strlen(tokens[0]));
char outgoingmsg[MAXDATASIZE]; // String to send to client
- if (!snprintf(outgoingmsg, MAXDATASIZE, "PONG %s", tokens[1])) { // TODO - Make sure tokens[1] actually has a token
+ if (!snprintf(outgoingmsg, MAXDATASIZE, ":%s PONG %s :%s", ircdstate->ircdname, ircdstate->ircdname, tokens[1])) { // TODO - Make sure tokens[1] actually has a token
fprintf(stderr, "Error while preparing PONG response!\n");
debugprint(DEBUG_CRIT, "Error while preparing PONG response!\n");
outgoingmsg[0] = '\0';