diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/command/cmd_funcs.c | 5 | ||||
-rw-r--r-- | src/xmpp/xmpp.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 71c8816a..42553f5a 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -5863,6 +5863,11 @@ cmd_ping(ProfWin *window, const char *const command, gchar **args) return TRUE; } + if (args[0] == NULL && connection_supports(XMPP_FEATURE_PING) == FALSE) { + cons_show("Server does not support ping requests."); + return TRUE; + } + iq_send_ping(args[0]); if (args[0] == NULL) { diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index 2befccd2..fa36cf19 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -55,6 +55,7 @@ #define JABBER_PRIORITY_MIN -128 #define JABBER_PRIORITY_MAX 127 +#define XMPP_FEATURE_PING "urn:xmpp:ping" #define XMPP_FEATURE_BLOCKING "urn:xmpp:blocking" #define XMPP_FEATURE_RECEIPTS "urn:xmpp:receipts" #define XMPP_FEATURE_LASTACTIVITY "jabber:iq:last" |