changeset 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 eafd2c5d6b84
children 4bb3d8dc717e
files src/protocols/zephyr/zephyr.c
diffstat 1 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/zephyr/zephyr.c	Fri Mar 12 06:12:16 2004 +0000
+++ b/src/protocols/zephyr/zephyr.c	Fri Mar 12 16:22:30 2004 +0000
@@ -365,21 +365,20 @@
 
 			if (ZParseLocations(&notice, NULL, &nlocs, &user) != ZERR_NONE)
 				return;
-			if ((b = gaim_find_buddy(zgc->account, user)) == NULL) {
+
+                        if ((b = gaim_find_buddy(zgc->account, user)) == NULL) {
 				char *e = strchr(user, '@');
-				if (e) *e = '\0';
+                                if(e && !g_ascii_strcasecmp(e+1,gaim_zephyr_get_realm()) ) {
+                                        *e = '\0';
+                                }
 				b = gaim_find_buddy(zgc->account, user);
-			}
-			if (!b) {
-				free(user);
-				return;
-			}
-			if (pending_zloc(b->name)) {
+                        }
+			if ((b && pending_zloc(b->name)) || pending_zloc(user) ) {
 				ZLocations_t locs;
 				int one = 1;
 				GString *str = g_string_new("");
-				g_string_append_printf(str, _("<b>User:</b> %s<br>"), b->name);
-				if (b->alias)
+				g_string_append_printf(str, _("<b>User:</b> %s<br>"), b?b->name:user);
+				if (b && b->alias)
 					g_string_append_printf(str, _("<b>Alias:</b> %s<br>"), b->alias);
 				if (!nlocs) {
 					g_string_append_printf(str, _("<br>Hidden or not logged-in"));