Mercurial > pidgin
comparison src/protocols/zephyr/zephyr.c @ 8435:6bd8bc8f07bb
[gaim-migrate @ 9165]
"Within zephyr chats, right clicking on a person in the room occupant list
will actually get their info now, if they weren't already in your buddy
list. This didn't work before." --Arun A Tharuvai. This does not break the
string freeze, so in it goes :-)
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Fri, 12 Mar 2004 16:22:30 +0000 |
parents | 143d0b29ba82 |
children | 4ae3eb203615 |
comparison
equal
deleted
inserted
replaced
8434:eafd2c5d6b84 | 8435:6bd8bc8f07bb |
---|---|
363 char *user; | 363 char *user; |
364 GaimBuddy *b; | 364 GaimBuddy *b; |
365 | 365 |
366 if (ZParseLocations(¬ice, NULL, &nlocs, &user) != ZERR_NONE) | 366 if (ZParseLocations(¬ice, NULL, &nlocs, &user) != ZERR_NONE) |
367 return; | 367 return; |
368 if ((b = gaim_find_buddy(zgc->account, user)) == NULL) { | 368 |
369 if ((b = gaim_find_buddy(zgc->account, user)) == NULL) { | |
369 char *e = strchr(user, '@'); | 370 char *e = strchr(user, '@'); |
370 if (e) *e = '\0'; | 371 if(e && !g_ascii_strcasecmp(e+1,gaim_zephyr_get_realm()) ) { |
372 *e = '\0'; | |
373 } | |
371 b = gaim_find_buddy(zgc->account, user); | 374 b = gaim_find_buddy(zgc->account, user); |
372 } | 375 } |
373 if (!b) { | 376 if ((b && pending_zloc(b->name)) || pending_zloc(user) ) { |
374 free(user); | |
375 return; | |
376 } | |
377 if (pending_zloc(b->name)) { | |
378 ZLocations_t locs; | 377 ZLocations_t locs; |
379 int one = 1; | 378 int one = 1; |
380 GString *str = g_string_new(""); | 379 GString *str = g_string_new(""); |
381 g_string_append_printf(str, _("<b>User:</b> %s<br>"), b->name); | 380 g_string_append_printf(str, _("<b>User:</b> %s<br>"), b?b->name:user); |
382 if (b->alias) | 381 if (b && b->alias) |
383 g_string_append_printf(str, _("<b>Alias:</b> %s<br>"), b->alias); | 382 g_string_append_printf(str, _("<b>Alias:</b> %s<br>"), b->alias); |
384 if (!nlocs) { | 383 if (!nlocs) { |
385 g_string_append_printf(str, _("<br>Hidden or not logged-in")); | 384 g_string_append_printf(str, _("<br>Hidden or not logged-in")); |
386 } | 385 } |
387 for (; nlocs > 0; nlocs--) { | 386 for (; nlocs > 0; nlocs--) { |