Mercurial > pidgin
comparison src/protocols/irc/irc.c @ 2090:b66aca8e8dce
[gaim-migrate @ 2100]
change ../config.h to <config.h> because that's better. change from GdkInput functions to GaimInput for reasons mentioned elsewhere.
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Tue, 31 Jul 2001 23:23:40 +0000 |
| parents | 424a40f12a6c |
| children | a93aeb6f813d |
comparison
equal
deleted
inserted
replaced
| 2089:bb1ddaaf0d26 | 2090:b66aca8e8dce |
|---|---|
| 18 * along with this program; if not, write to the Free Software | 18 * along with this program; if not, write to the Free Software |
| 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 20 * | 20 * |
| 21 */ | 21 */ |
| 22 | 22 |
| 23 #include "../config.h" | 23 #include <config.h> |
| 24 | 24 |
| 25 | 25 |
| 26 #include <netdb.h> | 26 #include <netdb.h> |
| 27 #include <gtk/gtk.h> | 27 #include <gtk/gtk.h> |
| 28 #include <unistd.h> | 28 #include <unistd.h> |
| 566 return b; | 566 return b; |
| 567 } | 567 } |
| 568 | 568 |
| 569 | 569 |
| 570 | 570 |
| 571 static void irc_callback(gpointer data, gint source, GdkInputCondition condition) | 571 static void irc_callback(gpointer data, gint source, GaimInputCondition condition) |
| 572 { | 572 { |
| 573 struct gaim_connection *gc = data; | 573 struct gaim_connection *gc = data; |
| 574 int i = 0; | 574 int i = 0; |
| 575 gchar buf[4096]; | 575 gchar buf[4096]; |
| 576 gchar **buf2; | 576 gchar **buf2; |
| 1833 chats = g_list_remove(chats, cc); | 1833 chats = g_list_remove(chats, cc); |
| 1834 g_free(cc); | 1834 g_free(cc); |
| 1835 } | 1835 } |
| 1836 | 1836 |
| 1837 if (gc->inpa) | 1837 if (gc->inpa) |
| 1838 gdk_input_remove(gc->inpa); | 1838 gaim_input_remove(gc->inpa); |
| 1839 | 1839 |
| 1840 if (idata->inpa) | 1840 if (idata->inpa) |
| 1841 gdk_input_remove(idata->inpa); | 1841 gaim_input_remove(idata->inpa); |
| 1842 | 1842 |
| 1843 close(idata->fd); | 1843 close(idata->fd); |
| 1844 g_free(gc->proto_data); | 1844 g_free(gc->proto_data); |
| 1845 } | 1845 } |
| 1846 | 1846 |
| 1860 write(idata->fd, buf, strlen(buf)); | 1860 write(idata->fd, buf, strlen(buf)); |
| 1861 | 1861 |
| 1862 g_free(buf); | 1862 g_free(buf); |
| 1863 } | 1863 } |
| 1864 | 1864 |
| 1865 static void irc_login_callback(gpointer data, gint source, GdkInputCondition condition) | 1865 static void irc_login_callback(gpointer data, gint source, GaimInputCondition condition) |
| 1866 { | 1866 { |
| 1867 struct gaim_connection *gc = data; | 1867 struct gaim_connection *gc = data; |
| 1868 struct irc_data *idata; | 1868 struct irc_data *idata; |
| 1869 char buf[4096]; | 1869 char buf[4096]; |
| 1870 | 1870 |
| 1891 hide_login_progress(gc, "Write error"); | 1891 hide_login_progress(gc, "Write error"); |
| 1892 signoff(gc); | 1892 signoff(gc); |
| 1893 return; | 1893 return; |
| 1894 } | 1894 } |
| 1895 | 1895 |
| 1896 idata->inpa = gdk_input_add(idata->fd, GDK_INPUT_READ, irc_callback, gc); | 1896 idata->inpa = gaim_input_add(idata->fd, GAIM_INPUT_READ, irc_callback, gc); |
| 1897 idata->inpa = 0; | 1897 idata->inpa = 0; |
| 1898 | 1898 |
| 1899 /* Now lets sign ourselves on */ | 1899 /* Now lets sign ourselves on */ |
| 1900 account_online(gc); | 1900 account_online(gc); |
| 1901 serv_finish_login(gc); | 1901 serv_finish_login(gc); |
