aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc.c')
-rw-r--r--src/irc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/irc.c b/src/irc.c
index 9f8118f..e2b8afa 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -139,6 +139,12 @@ static void print_ping_time(char *p) {
*/
}
+static void do_server_pong(void) {
+ msg_src = "Server";
+ // FIXME: what if the server doesn't :-quote the response?
+ print_ping_time(msg_text);
+}
+
/* FIXME: this isn't very fast */
static void do_ctcp(int is_notice) {
static char *p, *ctcp_type, *resp;
@@ -493,6 +499,8 @@ static void dispatch_msg(void) {
do_kick();
} else if(streq_i(msg_cmd, "MODE")) {
do_mode();
+ } else if(streq_i(msg_cmd, "PONG")) {
+ do_server_pong();
} else if(isdigit(msg_cmd[0])) {
do_numeric();
} else {