comparison src/protocols/irc/irc.c @ 2782:428bd24c18c6

[gaim-migrate @ 2795] maybe this is better? committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 20 Nov 2001 20:47:25 +0000
parents a0fd8f91e294
children 8f6365332a05
comparison
equal deleted inserted replaced
2781:c172128500ec 2782:428bd24c18c6
804 } 804 }
805 /* XXX doesn't handle ERROR */ 805 /* XXX doesn't handle ERROR */
806 return FALSE; 806 return FALSE;
807 } 807 }
808 808
809 if (!idata->online) {
810 /* Now lets sign ourselves on */
811 account_online(gc);
812 serv_finish_login(gc);
813
814 if (bud_list_cache_exists(gc))
815 do_import(gc, NULL);
816
817 /* we don't call this now because otherwise some IRC servers might not like us */
818 idata->timer = g_timeout_add(20000, irc_request_buddy_update, gc);
819 idata->online = TRUE;
820 }
821
809 buf++; 822 buf++;
810 823
811 process_data_init(pdibuf, buf, word, word_eol, FALSE); 824 process_data_init(pdibuf, buf, word, word_eol, FALSE);
812 825
813 if (atoi(word[2])) { 826 if (atoi(word[2])) {
932 struct gaim_connection *gc = data; 945 struct gaim_connection *gc = data;
933 struct irc_data *idata = gc->proto_data; 946 struct irc_data *idata = gc->proto_data;
934 int i = 0; 947 int i = 0;
935 gchar buf[1024]; 948 gchar buf[1024];
936 gboolean off; 949 gboolean off;
937
938 if (!idata->online) {
939 /* Now lets sign ourselves on */
940 account_online(gc);
941 serv_finish_login(gc);
942
943 if (bud_list_cache_exists(gc))
944 do_import(gc, NULL);
945
946 /* we don't call this now because otherwise some IRC servers might not like us */
947 idata->timer = g_timeout_add(20000, irc_request_buddy_update, gc);
948 idata->online = TRUE;
949 }
950 950
951 i = read(idata->fd, buf, 1024); 951 i = read(idata->fd, buf, 1024);
952 if (i <= 0) { 952 if (i <= 0) {
953 hide_login_progress(gc, "Read error"); 953 hide_login_progress(gc, "Read error");
954 signoff(gc); 954 signoff(gc);