summary refs log tree commit diff stats
path: root/src/common/chanopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/chanopt.c')
-rw-r--r--src/common/chanopt.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/common/chanopt.c b/src/common/chanopt.c
index a4fd8faa..198ebe6c 100644
--- a/src/common/chanopt.c
+++ b/src/common/chanopt.c
@@ -3,12 +3,15 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <errno.h>
 
+#ifndef WIN32
+#include <unistd.h>
+#endif
+
 #include "xchat.h"
 
 #include "cfgfiles.h"
@@ -81,9 +84,9 @@ chanopt_command (session *sess, char *tbuf, char *word[], char *word_eol[])
 
 	if (word[offset][0])
 	{
-		if (!strcasecmp (word[offset], "ON"))
+		if (!g_ascii_strcasecmp (word[offset], "ON"))
 			newval = 1;
-		else if (!strcasecmp (word[offset], "OFF"))
+		else if (!g_ascii_strcasecmp (word[offset], "OFF"))
 			newval = 0;
 		else if (word[offset][0] == 'u')
 			newval = SET_DEFAULT;
@@ -183,8 +186,8 @@ chanopt_find (char *network, char *channel, gboolean add_new)
 	for (list = chanopt_list; list; list = list->next)
 	{
 		co = list->data;
-		if (!strcasecmp (co->channel, channel) &&
-			 !strcasecmp (co->network, network))
+		if (!g_ascii_strcasecmp (co->channel, channel) &&
+			 !g_ascii_strcasecmp (co->network, network))
 			return co;
 	}