comparison src/protocols/msn/msn.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 fe919915fceb
children f2e86683cafc
comparison
equal deleted inserted replaced
10645:6480697e907b 10646:6a618db0a404
821 const char *state; 821 const char *state;
822 int msnstatus; 822 int msnstatus;
823 823
824 gc = gaim_account_get_connection(account); 824 gc = gaim_account_get_connection(account);
825 825
826 if (gc == NULL) 826 if (gc)
827 session = gc->proto_data;
828
829 state = gaim_status_get_id(status);
830
831 printf("%d %s\n", gc, state);
832 if (strcmp(state, "offline") && !gc) {
833 gaim_account_connect(account, status);
827 return; 834 return;
828 835 }
829 session = gc->proto_data; 836 else if (!strcmp(state, "away"))
830
831 state = gaim_status_get_id(status);
832
833 if (!strcmp(state, "away"))
834 msnstatus = MSN_AWAY; 837 msnstatus = MSN_AWAY;
835 else if (!strcmp(state, "brb")) 838 else if (!strcmp(state, "brb"))
836 msnstatus = MSN_BRB; 839 msnstatus = MSN_BRB;
837 else if (!strcmp(state, "busy")) 840 else if (!strcmp(state, "busy"))
838 msnstatus = MSN_BUSY; 841 msnstatus = MSN_BUSY;
844 msnstatus = MSN_HIDDEN; 847 msnstatus = MSN_HIDDEN;
845 else if (0) /* how do we detect idle with new status? */ 848 else if (0) /* how do we detect idle with new status? */
846 msnstatus = MSN_IDLE; 849 msnstatus = MSN_IDLE;
847 else 850 else
848 msnstatus = MSN_ONLINE; 851 msnstatus = MSN_ONLINE;
849 852 if (gc)
850 msn_change_status(session, msnstatus); 853 msn_change_status(session, msnstatus);
851 } 854 }
852 855
853 static void 856 static void
854 msn_set_idle(GaimConnection *gc, int idle) 857 msn_set_idle(GaimConnection *gc, int idle)
855 { 858 {