Show message when server does not support ping

This commit is contained in:
James Booth
2017-06-15 23:27:30 +01:00
parent cbaa419a31
commit 6511d61b13
5 changed files with 34 additions and 0 deletions

View File

@@ -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) {

View File

@@ -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"