about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2017-06-16 00:59:21 +0100
committerJames Booth <boothj5@gmail.com>2017-06-16 00:59:21 +0100
commitf189dbc687843603e33cc950af3c158becf21a60 (patch)
tree419c51c7ca907a2d7355767fbe4ca97d80aa4609 /src
parent970ab94ed3d67c9bba72459aa3ee56077387db7b (diff)
downloadprofani-tty-f189dbc687843603e33cc950af3c158becf21a60.tar.gz
Only send ping requests to client that support it
Diffstat (limited to 'src')
-rw-r--r--src/command/cmd_funcs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index 42553f5a..6409ec54 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -5868,6 +5868,11 @@ cmd_ping(ProfWin *window, const char *const command, gchar **args)
         return TRUE;
     }
 
+    if (args[0] != NULL && caps_jid_has_feature(args[0], XMPP_FEATURE_PING) == FALSE) {
+        cons_show("%s does not support ping requests.", args[0]);
+        return TRUE;
+    }
+
     iq_send_ping(args[0]);
 
     if (args[0] == NULL) {