diff options
author | ubq323 <ubq323@ubq323.website> | 2022-10-28 01:28:32 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2022-10-28 01:28:32 +0100 |
commit | e3013792ea7a4b05ea44ae29fb462ceba323b0e8 (patch) | |
tree | 5ac595d31f5ac89947b393b9d5dbb2d4f653548d | |
parent | 612ae13c83235092d100b8ee86c5b7425aa36c36 (diff) |
enpongment
-rw-r--r-- | irc.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,5 +1,6 @@ - #include "irc.h" + +#include "debug.h" #include "conf.h" #include "util.h" @@ -76,6 +77,13 @@ handle(char msg[], size_t len) } } printf("}\n"); + + if (len >=4 && strncmp(msg, "PING", 4) == 0) { + DP("ponging"); + // this modifies buffer in place. which is presumably fine + msg[1] = 'O'; + irc_sendall(msg,len); + } } |