Mercurial > pidgin
comparison plugins/irc.c @ 1046:4593605da0e2
[gaim-migrate @ 1056]
1. made it compile again (gc->groups instead of just groups, account_online(user, gc) instead of just (gc), and most things are GSLists now, oh yeah, serv_got_update(gc, ...) and add_buddy(gc, ...)).
2. took out the stuff to set up the buddy list window, because account_online handles that now
3. change the init function to use load_protocol(), which is the new interface for loading a new protocol. it's basically the same but without actually touching the protocols list.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 01 Nov 2000 11:34:56 +0000 |
parents | d5c022006a60 |
children | ece2d1543b20 |
comparison
equal
deleted
inserted
replaced
1045:e281fe55bc78 | 1046:4593605da0e2 |
---|---|
113 return; | 113 return; |
114 } | 114 } |
115 | 115 |
116 void irc_request_buddy_update ( struct gaim_connection *gc ) { | 116 void irc_request_buddy_update ( struct gaim_connection *gc ) { |
117 struct irc_data *idata = (struct irc_data *)gc->proto_data; | 117 struct irc_data *idata = (struct irc_data *)gc->proto_data; |
118 GSList *grp = groups; | 118 GSList *grp = gc->groups; |
119 GList *person; | 119 GSList *person; |
120 struct group *g; | 120 struct group *g; |
121 struct buddy *b; | 121 struct buddy *b; |
122 struct irc_channel *u; | 122 struct irc_channel *u; |
123 gchar buf[IRC_BUF_LEN+1]; | 123 gchar buf[IRC_BUF_LEN+1]; |
124 | 124 |
504 while (temp) { | 504 while (temp) { |
505 | 505 |
506 u = temp->data; | 506 u = temp->data; |
507 | 507 |
508 /* Tell Gaim to bring the person on or off line */ | 508 /* Tell Gaim to bring the person on or off line */ |
509 serv_got_update(u->name, u->id, 0, 0, 0, 0, 0); | 509 serv_got_update(gc, u->name, u->id, 0, 0, 0, 0, 0); |
510 | 510 |
511 /* Grab the next entry */ | 511 /* Grab the next entry */ |
512 temp = g_slist_next(temp); | 512 temp = g_slist_next(temp); |
513 } | 513 } |
514 | 514 |
874 g_snprintf(buf, 4096, "NICK %s\nUSER %s localhost %s :GAIM (www.marko.net/gaim)\n", gc->username, gc->username, gc->username); | 874 g_snprintf(buf, 4096, "NICK %s\nUSER %s localhost %s :GAIM (www.marko.net/gaim)\n", gc->username, gc->username, gc->username); |
875 write(idata->fd, buf, strlen(buf)); | 875 write(idata->fd, buf, strlen(buf)); |
876 | 876 |
877 | 877 |
878 /* Now lets sign ourselves on */ | 878 /* Now lets sign ourselves on */ |
879 account_online(gc); | 879 account_online(user, gc); |
880 | |
881 if (mainwindow) | |
882 gtk_widget_hide(mainwindow); | |
883 | |
884 show_buddy_list(); | |
885 refresh_buddy_window(); | |
886 | |
887 serv_finish_login(gc); | 880 serv_finish_login(gc); |
888 gaim_setup(gc); | |
889 | 881 |
890 if (bud_list_cache_exists(gc)) | 882 if (bud_list_cache_exists(gc)) |
891 do_import(NULL, gc); | 883 do_import(NULL, gc); |
892 | 884 |
893 | 885 |
933 | 925 |
934 return ret; | 926 return ret; |
935 } | 927 } |
936 | 928 |
937 int gaim_plugin_init(void *handle) { | 929 int gaim_plugin_init(void *handle) { |
938 protocols = g_slist_append(protocols, irc_init()); | 930 load_protocl(irc_init); |
939 return 0; | 931 return 0; |
940 } | 932 } |