comparison mcabber/mcabber/commands.c @ 1705:ac881b5f9248

Add /request ping (XEP-0199), by merging isbear's module
author Mikael Berthe <mikael@lilotux.net>
date Mon, 08 Feb 2010 21:23:05 +0100
parents 393c05fba337
children 98d99485d276
comparison
equal deleted inserted replaced
1704:ab502d645378 1705:ac881b5f9248
303 compl_add_category_word(COMPL_AUTH, "request"); 303 compl_add_category_word(COMPL_AUTH, "request");
304 compl_add_category_word(COMPL_AUTH, "request_unsubscribe"); 304 compl_add_category_word(COMPL_AUTH, "request_unsubscribe");
305 305
306 // Request (query) category 306 // Request (query) category
307 compl_add_category_word(COMPL_REQUEST, "last"); 307 compl_add_category_word(COMPL_REQUEST, "last");
308 compl_add_category_word(COMPL_REQUEST, "ping");
308 compl_add_category_word(COMPL_REQUEST, "time"); 309 compl_add_category_word(COMPL_REQUEST, "time");
309 compl_add_category_word(COMPL_REQUEST, "vcard"); 310 compl_add_category_word(COMPL_REQUEST, "vcard");
310 compl_add_category_word(COMPL_REQUEST, "version"); 311 compl_add_category_word(COMPL_REQUEST, "version");
311 312
312 // Events category 313 // Events category
3240 numtype = iqreq_version; 3241 numtype = iqreq_version;
3241 else if (!strcasecmp(type, "time")) 3242 else if (!strcasecmp(type, "time"))
3242 numtype = iqreq_time; 3243 numtype = iqreq_time;
3243 else if (!strcasecmp(type, "last")) 3244 else if (!strcasecmp(type, "last"))
3244 numtype = iqreq_last; 3245 numtype = iqreq_last;
3246 else if (!strcasecmp(type, "ping"))
3247 numtype = iqreq_ping;
3245 else if (!strcasecmp(type, "vcard")) 3248 else if (!strcasecmp(type, "vcard"))
3246 numtype = iqreq_vcard; 3249 numtype = iqreq_vcard;
3247 } 3250 }
3248 3251
3249 if (!type || !numtype) { 3252 if (!type || !numtype) {
3288 switch (numtype) { 3291 switch (numtype) {
3289 case iqreq_version: 3292 case iqreq_version:
3290 case iqreq_time: 3293 case iqreq_time:
3291 case iqreq_last: 3294 case iqreq_last:
3292 case iqreq_vcard: 3295 case iqreq_vcard:
3296 case iqreq_ping:
3293 xmpp_request(fjid, numtype); 3297 xmpp_request(fjid, numtype);
3294 break; 3298 break;
3295 default: 3299 default:
3296 break; 3300 break;
3297 } 3301 }