Mercurial > ~mikael > mcabber > hg
comparison mcabber/mcabber/commands.c @ 1720:98d99485d276
Do not use the full JID for vcard requests (Hermitifier)
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 25 Feb 2010 21:26:15 +0100 |
parents | ac881b5f9248 |
children | b18142457ca9 |
comparison
equal
deleted
inserted
replaced
1719:f3c5e1175b22 | 1720:98d99485d276 |
---|---|
3225 } | 3225 } |
3226 | 3226 |
3227 static void do_request(char *arg) | 3227 static void do_request(char *arg) |
3228 { | 3228 { |
3229 char **paramlst; | 3229 char **paramlst; |
3230 char *fjid, *type; | 3230 char *fjid, *type, *tmp; |
3231 enum iqreq_type numtype = iqreq_none; | 3231 enum iqreq_type numtype = iqreq_none; |
3232 char *jid_utf8 = NULL; | 3232 char *jid_utf8 = NULL; |
3233 | 3233 |
3234 paramlst = split_arg(arg, 2, 0); // type, jid | 3234 paramlst = split_arg(arg, 2, 0); // type, jid |
3235 type = *paramlst; | 3235 type = *paramlst; |
3287 scr_LogPrint(LPRINT_NORMAL, "Please specify a Jabber ID."); | 3287 scr_LogPrint(LPRINT_NORMAL, "Please specify a Jabber ID."); |
3288 } | 3288 } |
3289 | 3289 |
3290 if (fjid) { | 3290 if (fjid) { |
3291 switch (numtype) { | 3291 switch (numtype) { |
3292 case iqreq_vcard: | |
3293 // vCards requests are done to bare jid | |
3294 tmp = strchr(fjid, JID_RESOURCE_SEPARATOR); | |
3295 if (tmp) *tmp = '\0'; | |
3292 case iqreq_version: | 3296 case iqreq_version: |
3293 case iqreq_time: | 3297 case iqreq_time: |
3294 case iqreq_last: | 3298 case iqreq_last: |
3295 case iqreq_vcard: | |
3296 case iqreq_ping: | 3299 case iqreq_ping: |
3297 xmpp_request(fjid, numtype); | 3300 xmpp_request(fjid, numtype); |
3298 break; | 3301 break; |
3299 default: | 3302 default: |
3300 break; | 3303 break; |