diff --git a/plugins/fishlim/plugin_hexchat.c b/plugins/fishlim/plugin_hexchat.c index dbda808d..b898b93d 100644 --- a/plugins/fishlim/plugin_hexchat.c +++ b/plugins/fishlim/plugin_hexchat.c @@ -357,7 +357,6 @@ cleanup: static int handle_setkey(char *word[], char *word_eol[], void *userdata) { const char *nick; const char *key; - char *key_lower; enum fish_mode mode; /* Check syntax */ @@ -377,14 +376,12 @@ static int handle_setkey(char *word[], char *word_eol[], void *userdata) { } mode = FISH_ECB_MODE; - key_lower = g_ascii_strdown(key, -1); - if (strncmp("cbc:", key_lower, 4) == 0) { + if (g_ascii_strncasecmp("cbc:", key, 4) == 0) { key = key+4; mode = FISH_CBC_MODE; - } else if (strncmp("ecb:", key_lower, 4) == 0) { + } else if (g_ascii_strncasecmp("ecb:", key, 4) == 0) { key = key+4; } - g_free(key_lower); /* Set password */ if (keystore_store_key(nick, key, mode)) {