diff src/protocols/jabber/presence.c @ 10646:6a618db0a404

[gaim-migrate @ 12162] Made IRC, Jabber, MSN, and ICQ not crash on login. Note that these don't necessarily work the way they should yet, they just don't crash. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Tue, 01 Mar 2005 21:15:58 +0000
parents 8bcf7909bec8
children 72a5babfa8b4
line wrap: on
line diff
--- a/src/protocols/jabber/presence.c	Mon Feb 28 18:18:22 2005 +0000
+++ b/src/protocols/jabber/presence.c	Tue Mar 01 21:15:58 2005 +0000
@@ -102,10 +102,13 @@
 
 	if(!account) return ;
 	gc = account->gc;
-
-	if(!gc) return ;
+	
+	if (!gc && strcmp(gaim_status_get_id(status), "offline"))
+		gaim_account_connect(account, status);
+	
+	if(!gc) return;
 	js= gc->proto_data;
-
+	
 	gaim_status_to_jabber(status, &state, &msg, &priority);
 
 	if(msg)