summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2017-10-29 15:59:51 +0100
committerLemonBoy <thatlemon@gmail.com>2018-01-07 12:36:20 +0100
commit6c45ab0493e42bca08016ad70a54bb523282b7b8 (patch)
tree44e195996d94fe76552fd99619bb42a01607e686 /src
parentc00132ac4cf78702b4f72fc6a0085432bcef2fac (diff)
downloadirssi-6c45ab0493e42bca08016ad70a54bb523282b7b8.zip
Command names may be in lower-case
Do not take the string case into account when comparing the command name.
Diffstat (limited to 'src')
-rw-r--r--src/irc/core/irc-cap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/irc/core/irc-cap.c b/src/irc/core/irc-cap.c
index 5d033bbf..1a76fc8e 100644
--- a/src/irc/core/irc-cap.c
+++ b/src/irc/core/irc-cap.c
@@ -147,7 +147,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
caps = g_strsplit(g_strchomp(list), " ", -1);
caps_length = g_strv_length(caps);
- if (!strcmp(evt, "LS")) {
+ if (!g_ascii_strcasecmp(evt, "LS")) {
/* Throw away everything and start from scratch */
g_hash_table_remove_all(server->cap_supported);
@@ -204,7 +204,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
}
}
}
- else if (!strcmp(evt, "ACK")) {
+ else if (!g_ascii_strcasecmp(evt, "ACK")) {
int got_sasl = FALSE;
/* Emit a signal for every ack'd cap */
@@ -228,7 +228,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
if (got_sasl == FALSE)
cap_finish_negotiation(server);
}
- else if (!strcmp(evt, "NAK")) {
+ else if (!g_ascii_strcasecmp(evt, "NAK")) {
g_warning("The server answered with a NAK to our CAP request, this should not happen");
/* A NAK'd request means that a required cap can't be enabled or disabled, don't update the
@@ -236,7 +236,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
for (i = 0; i < caps_length; i++)
cap_emit_signal(server, "nak", caps[i]);
}
- else if (!strcmp(evt, "NEW")) {
+ else if (!g_ascii_strcasecmp(evt, "NEW")) {
for (i = 0; i < caps_length; i++) {
char *key, *val;
@@ -249,7 +249,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
cap_emit_signal(server, "new", key);
}
}
- else if (!strcmp(evt, "DEL")) {
+ else if (!g_ascii_strcasecmp(evt, "DEL")) {
for (i = 0; i < caps_length; i++) {
char *key, *val;