aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-10-28 01:28:32 +0100
committerubq323 <ubq323@ubq323.website>2022-10-28 01:28:32 +0100
commite3013792ea7a4b05ea44ae29fb462ceba323b0e8 (patch)
tree5ac595d31f5ac89947b393b9d5dbb2d4f653548d
parent612ae13c83235092d100b8ee86c5b7425aa36c36 (diff)
enpongment
-rw-r--r--irc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/irc.c b/irc.c
index 314c3b7..5af46ae 100644
--- a/irc.c
+++ b/irc.c
@@ -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);
+ }
}