comparison plugins/irc.c @ 2003:ffae8228d63a

[gaim-migrate @ 2013] small fixes committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 12 Jun 2001 22:59:05 +0000
parents b71494004378
children 21f1f1e0d4c5
comparison
equal deleted inserted replaced
2002:7c2457745344 2003:ffae8228d63a
1875 } 1875 }
1876 1876
1877 static void irc_login_callback(gpointer data, gint source, GdkInputCondition condition) 1877 static void irc_login_callback(gpointer data, gint source, GdkInputCondition condition)
1878 { 1878 {
1879 struct gaim_connection *gc = data; 1879 struct gaim_connection *gc = data;
1880 struct irc_data *idata = gc->proto_data; 1880 struct irc_data *idata;
1881 char buf[4096]; 1881 char buf[4096];
1882
1883 if (!g_slist_find(connections, gc)) {
1884 close(source);
1885 return;
1886 }
1887
1888 idata = gc->proto_data;
1882 1889
1883 if (source == -1) { 1890 if (source == -1) {
1884 hide_login_progress(gc, "Write error"); 1891 hide_login_progress(gc, "Write error");
1885 signoff(gc); 1892 signoff(gc);
1886 return; 1893 return;
1887 } 1894 }
1888 1895
1889 if (idata->fd == 0) 1896 if (idata->fd != source)
1890 idata->fd = source; 1897 idata->fd = source;
1891 1898
1892 g_snprintf(buf, 4096, "NICK %s\n USER %s localhost %s :GAIM (%s)\n", 1899 g_snprintf(buf, 4096, "NICK %s\n USER %s localhost %s :GAIM (%s)\n",
1893 gc->username, g_get_user_name(), gc->user->proto_opt[USEROPT_SERV], WEBSITE); 1900 gc->username, g_get_user_name(), gc->user->proto_opt[USEROPT_SERV], WEBSITE);
1894 1901