aboutsummaryrefslogtreecommitdiff
path: root/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'irc.c')
-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);
+ }
}