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