Index: plugin.c
===================================================================
--- plugin.c	(revision 2728)
+++ plugin.c	(working copy)
@@ -204,7 +204,9 @@
 static int
 xchat_read_fd (xchat_plugin *ph, GIOChannel *source, char *buf, int *len)
 {
-	return g_io_channel_read (source, buf, *len, len);
+        
+       return g_io_channel_read_chars(source, buf, *len, len, NULL);
+
 }
 #endif
 
Index: server.c
===================================================================
--- server.c	(revision 2728)
+++ server.c	(working copy)
@@ -848,7 +848,7 @@
 
 	while (1)
 	{
-		if (g_io_channel_read (source, &buf[i], 1, &len) != G_IO_ERROR_NONE)
+	        if (g_io_channel_read_chars(source, &buf[i], 1, &len, NULL) != G_IO_ERROR_NORMAL)
 			return -1;
 		if (buf[i] == '\n' || bufsize == i + 1)
 		{
