comparison mcabber/src/commands.c @ 1015:579299b1c9b2

Add /request last
author Mikael Berthe <mikael@lilotux.net>
date Mon, 13 Nov 2006 21:58:18 +0100
parents 99c5278bf6b8
children 4d3c48844746
comparison
equal deleted inserted replaced
1014:99c5278bf6b8 1015:579299b1c9b2
210 compl_add_category_word(COMPL_AUTH, "cancel"); 210 compl_add_category_word(COMPL_AUTH, "cancel");
211 compl_add_category_word(COMPL_AUTH, "request"); 211 compl_add_category_word(COMPL_AUTH, "request");
212 compl_add_category_word(COMPL_AUTH, "request_unsubscribe"); 212 compl_add_category_word(COMPL_AUTH, "request_unsubscribe");
213 213
214 // Request (query) category 214 // Request (query) category
215 compl_add_category_word(COMPL_REQUEST, "last");
215 compl_add_category_word(COMPL_REQUEST, "time"); 216 compl_add_category_word(COMPL_REQUEST, "time");
216 compl_add_category_word(COMPL_REQUEST, "vcard"); 217 compl_add_category_word(COMPL_REQUEST, "vcard");
217 compl_add_category_word(COMPL_REQUEST, "version"); 218 compl_add_category_word(COMPL_REQUEST, "version");
218 219
219 // Events category 220 // Events category
2246 // Quick check... 2247 // Quick check...
2247 if (!strcasecmp(type, "version")) 2248 if (!strcasecmp(type, "version"))
2248 numtype = iqreq_version; 2249 numtype = iqreq_version;
2249 else if (!strcasecmp(type, "time")) 2250 else if (!strcasecmp(type, "time"))
2250 numtype = iqreq_time; 2251 numtype = iqreq_time;
2252 else if (!strcasecmp(type, "last"))
2253 numtype = iqreq_last;
2251 else if (!strcasecmp(type, "vcard")) 2254 else if (!strcasecmp(type, "vcard"))
2252 numtype = iqreq_vcard; 2255 numtype = iqreq_vcard;
2253 else if (!strcasecmp(type, "show_list")) { 2256 else if (!strcasecmp(type, "show_list")) {
2254 // Undocumented command, for debugging purposes only 2257 // Undocumented command, for debugging purposes only
2255 jb_iqs_display_list(); 2258 jb_iqs_display_list();
2258 } 2261 }
2259 } 2262 }
2260 2263
2261 if (!type || !numtype) { 2264 if (!type || !numtype) {
2262 scr_LogPrint(LPRINT_NORMAL, 2265 scr_LogPrint(LPRINT_NORMAL,
2263 "Please specify a query type (version, time)."); 2266 "Please specify a query type (version, time...).");
2264 free_arg_lst(paramlst); 2267 free_arg_lst(paramlst);
2265 return; 2268 return;
2266 } 2269 }
2267 2270
2268 // Allow special jid "" or "." (current buddy) 2271 // Allow special jid "" or "." (current buddy)
2291 2294
2292 if (jid) { 2295 if (jid) {
2293 switch (numtype) { 2296 switch (numtype) {
2294 case iqreq_version: 2297 case iqreq_version:
2295 case iqreq_time: 2298 case iqreq_time:
2299 case iqreq_last:
2296 case iqreq_vcard: 2300 case iqreq_vcard:
2297 jb_request(jid, numtype); 2301 jb_request(jid, numtype);
2298 break; 2302 break;
2299 default: 2303 default:
2300 break; 2304 break;