From 6d55ce363b2533080ad689cc73204ebd556eaefa Mon Sep 17 00:00:00 2001 From: Jakob Kramer Date: Tue, 17 Jul 2012 18:37:29 +0200 Subject: Unix compatibility for SASL --- plugins/sasl/sasl.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/sasl/sasl.c b/plugins/sasl/sasl.c index 30af0e42..5e2ea5c4 100644 --- a/plugins/sasl/sasl.c +++ b/plugins/sasl/sasl.c @@ -32,17 +32,18 @@ * http://tools.ietf.org/html/rfc4422 */ +#include #include #include #include -#include +#include #include "xchat-plugin.h" static xchat_plugin *ph; /* plugin handle */ static const char name[] = "SASL"; static const char desc[] = "SASL authentication plugin for HexChat"; -static const char version[] = "1.1"; +static const char version[] = "1.2"; static const char sasl_help[] = "SASL Usage:\n /SASL ADD , enable/update SASL authentication for given network\n /SASL DEL , disable SASL authentication for given network\n /SASL LIST, get the list of SASL-enabled networks\n"; struct sasl_info @@ -211,7 +212,7 @@ sasl_cmd_cb (char *word[], char *word_eol[], void *userdata) const char* network; const char* mode = word[2]; - if (!stricmp ("ADD", mode)) + if (!g_ascii_strcasecmp ("ADD", mode)) { login = word[3]; password = word[4]; @@ -234,7 +235,7 @@ sasl_cmd_cb (char *word[], char *word_eol[], void *userdata) return XCHAT_EAT_ALL; } - else if (!stricmp ("DEL", mode)) + else if (!g_ascii_strcasecmp ("DEL", mode)) { network = word_eol[3]; @@ -255,7 +256,7 @@ sasl_cmd_cb (char *word[], char *word_eol[], void *userdata) return XCHAT_EAT_ALL; } - else if (!stricmp ("LIST", mode)) + else if (!g_ascii_strcasecmp ("LIST", mode)) { print_info (); return XCHAT_EAT_ALL; -- cgit 1.4.1