diff options
Diffstat (limited to 'irc.c')
-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); + } } |