comparison src/protocols/jabber/presence.c @ 7322:ab828b8c3f22

[gaim-migrate @ 7908] all sorts of stuff including tweaks to logging so it mostly works again for jabber. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 24 Oct 2003 05:46:01 +0000
parents c41e522028f2
children b250288fa948
comparison
equal deleted inserted replaced
7321:c41e522028f2 7322:ab828b8c3f22
234 } 234 }
235 } 235 }
236 } 236 }
237 237
238 238
239 if((chat = jabber_chat_find(js, jid->node, jid->domain))) { 239 if(jid->node && (chat = jabber_chat_find(js, jid->node, jid->domain))) {
240 static int i = 0; 240 static int i = 0;
241 char *room_jid = g_strdup_printf("%s@%s", jid->node, jid->domain); 241 char *room_jid = g_strdup_printf("%s@%s", jid->node, jid->domain);
242 242
243 if(state == JABBER_STATE_ERROR) { 243 if(state == JABBER_STATE_ERROR) {
244 const char *code = NULL; 244 const char *code = NULL;
303 "got unexpected presence from %s, ignoring\n", from); 303 "got unexpected presence from %s, ignoring\n", from);
304 jabber_id_free(jid); 304 jabber_id_free(jid);
305 return; 305 return;
306 } 306 }
307 307
308 buddy_name = g_strdup_printf("%s@%s", jid->node, jid->domain); 308 buddy_name = g_strdup_printf("%s%s%s", jid->node ? jid->node : "",
309 jid->node ? "@" : "", jid->domain);
309 if((b = gaim_find_buddy(js->gc->account, buddy_name)) == NULL) { 310 if((b = gaim_find_buddy(js->gc->account, buddy_name)) == NULL) {
310 jabber_id_free(jid); 311 jabber_id_free(jid);
311 g_free(buddy_name); 312 g_free(buddy_name);
312 return; 313 return;
313 } 314 }