summaryrefslogtreecommitdiff
path: root/src/irc/core
diff options
context:
space:
mode:
authorDavid Hill <dhill@conformal.com>2014-06-10 12:06:19 -0400
committerDavid Hill <dhill@conformal.com>2014-06-10 12:06:19 -0400
commit0d4f13d20f304927277ad327c714481bc97de48f (patch)
tree0cea195e9fae20e3e10d48c5c829b0e894bdd492 /src/irc/core
parent5ca9287182092530dc206fa1af13fbe19cc357d1 (diff)
downloadirssi-0d4f13d20f304927277ad327c714481bc97de48f.zip
Replace deprecated g_str[n]casecmp with g_ascii_str[n]cmp.
Diffstat (limited to 'src/irc/core')
-rw-r--r--src/irc/core/bans.c2
-rw-r--r--src/irc/core/channel-events.c8
-rw-r--r--src/irc/core/channel-rejoin.c2
-rw-r--r--src/irc/core/ctcp.c2
-rw-r--r--src/irc/core/irc-commands.c2
-rw-r--r--src/irc/core/irc-expandos.c2
-rw-r--r--src/irc/core/irc-nicklist.c8
-rw-r--r--src/irc/core/irc-servers.c3
-rw-r--r--src/irc/core/massjoin.c8
-rw-r--r--src/irc/core/mode-lists.c2
-rw-r--r--src/irc/core/modes.c6
-rw-r--r--src/irc/core/netsplit.c12
12 files changed, 29 insertions, 28 deletions
diff --git a/src/irc/core/bans.c b/src/irc/core/bans.c
index 1d46acb8..de799812 100644
--- a/src/irc/core/bans.c
+++ b/src/irc/core/bans.c
@@ -150,7 +150,7 @@ void ban_remove(IRC_CHANNEL_REC *channel, const char *bans)
if (!found) {
rec = NULL;
- if (!g_strcasecmp(*ban, BAN_LAST)) {
+ if (!g_ascii_strcasecmp(*ban, BAN_LAST)) {
/* unnbanning last set ban */
rec = g_slist_nth_data(channel->banlist,
g_slist_length(channel->banlist) - 1);
diff --git a/src/irc/core/channel-events.c b/src/irc/core/channel-events.c
index 7d4fbd39..9198ed82 100644
--- a/src/irc/core/channel-events.c
+++ b/src/irc/core/channel-events.c
@@ -199,7 +199,7 @@ static IRC_CHANNEL_REC *channel_find_unjoined(IRC_SERVER_REC *server,
if (!IS_IRC_CHANNEL(rec) || rec->joined)
continue;
- if (g_strncasecmp(channel, rec->name, len) == 0 &&
+ if (g_ascii_strncasecmp(channel, rec->name, len) == 0 &&
(len > 20 || rec->name[len] == '\0'))
return rec;
}
@@ -214,7 +214,7 @@ static void event_join(IRC_SERVER_REC *server, const char *data, const char *nic
g_return_if_fail(data != NULL);
- if (g_strcasecmp(nick, server->nick) != 0) {
+ if (g_ascii_strcasecmp(nick, server->nick) != 0) {
/* someone else joined channel, no need to do anything */
return;
}
@@ -286,7 +286,7 @@ static void event_part(IRC_SERVER_REC *server, const char *data, const char *nic
g_return_if_fail(data != NULL);
- if (g_strcasecmp(nick, server->nick) != 0) {
+ if (g_ascii_strcasecmp(nick, server->nick) != 0) {
/* someone else part, no need to do anything here */
return;
}
@@ -311,7 +311,7 @@ static void event_kick(IRC_SERVER_REC *server, const char *data)
params = event_get_params(data, 3, &channel, &nick, &reason);
- if (g_strcasecmp(nick, server->nick) != 0) {
+ if (g_ascii_strcasecmp(nick, server->nick) != 0) {
/* someone else was kicked, no need to do anything */
g_free(params);
return;
diff --git a/src/irc/core/channel-rejoin.c b/src/irc/core/channel-rejoin.c
index c9528edc..d518f0c2 100644
--- a/src/irc/core/channel-rejoin.c
+++ b/src/irc/core/channel-rejoin.c
@@ -58,7 +58,7 @@ static REJOIN_REC *rejoin_find(IRC_SERVER_REC *server, const char *channel)
for (tmp = server->rejoin_channels; tmp != NULL; tmp = tmp->next) {
REJOIN_REC *rec = tmp->data;
- if (g_strcasecmp(rec->channel, channel) == 0)
+ if (g_ascii_strcasecmp(rec->channel, channel) == 0)
return rec;
}
diff --git a/src/irc/core/ctcp.c b/src/irc/core/ctcp.c
index be2edba0..accbb57f 100644
--- a/src/irc/core/ctcp.c
+++ b/src/irc/core/ctcp.c
@@ -44,7 +44,7 @@ static CTCP_CMD_REC *ctcp_cmd_find(const char *name)
for (tmp = ctcp_cmds; tmp != NULL; tmp = tmp->next) {
CTCP_CMD_REC *rec = tmp->data;
- if (g_strcasecmp(rec->name, name) == 0)
+ if (g_ascii_strcasecmp(rec->name, name) == 0)
return rec;
}
diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c
index 52a9a748..301b3300 100644
--- a/src/irc/core/irc-commands.c
+++ b/src/irc/core/irc-commands.c
@@ -418,7 +418,7 @@ static void cmd_whois(const char *data, IRC_SERVER_REC *server,
g_string_printf(tmpstr, "WHOIS %s", query);
else {
g_string_printf(tmpstr, "WHOIS %s %s", qserver, query);
- if (g_strcasecmp(qserver, query) == 0)
+ if (g_ascii_strcasecmp(qserver, query) == 0)
event_402 = "whois event not found";
}
diff --git a/src/irc/core/irc-expandos.c b/src/irc/core/irc-expandos.c
index a1030624..5d2de503 100644
--- a/src/irc/core/irc-expandos.c
+++ b/src/irc/core/irc-expandos.c
@@ -116,7 +116,7 @@ static void event_join(IRC_SERVER_REC *server, const char *data,
{
g_return_if_fail(nick != NULL);
- if (g_strcasecmp(nick, server->nick) != 0) {
+ if (g_ascii_strcasecmp(nick, server->nick) != 0) {
g_free_not_null(last_join);
last_join = g_strdup(nick);
}
diff --git a/src/irc/core/irc-nicklist.c b/src/irc/core/irc-nicklist.c
index 8a75233c..cbf8b9fa 100644
--- a/src/irc/core/irc-nicklist.c
+++ b/src/irc/core/irc-nicklist.c
@@ -342,9 +342,9 @@ static void event_nick_in_use(IRC_SERVER_REC *server, const char *data)
}
/* nick already in use - need to change it .. */
- if (g_strcasecmp(server->nick, server->connrec->nick) == 0 &&
+ if (g_ascii_strcasecmp(server->nick, server->connrec->nick) == 0 &&
server->connrec->alternate_nick != NULL &&
- g_strcasecmp(server->connrec->alternate_nick, server->nick) != 0) {
+ g_ascii_strcasecmp(server->connrec->alternate_nick, server->nick) != 0) {
/* first try, so try the alternative nick.. */
g_free(server->nick);
server->nick = g_strdup(server->connrec->alternate_nick);
@@ -400,10 +400,10 @@ static void event_nick(IRC_SERVER_REC *server, const char *data,
params = event_get_params(data, 1, &nick);
- if (g_strcasecmp(orignick, server->nick) == 0) {
+ if (g_ascii_strcasecmp(orignick, server->nick) == 0) {
/* You changed your nick */
if (server->last_nick != NULL &&
- g_strcasecmp(server->last_nick, nick) == 0) {
+ g_ascii_strcasecmp(server->last_nick, nick) == 0) {
/* changed with /NICK - keep it as wanted nick */
g_free(server->connrec->nick);
server->connrec->nick = g_strdup(nick);
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c
index 23960a38..787044b3 100644
--- a/src/irc/core/irc-servers.c
+++ b/src/irc/core/irc-servers.c
@@ -90,7 +90,8 @@ static void send_message(SERVER_REC *server, const char *target,
if (*target == '!') {
/* !chan -> !12345chan */
channel = channel_find(server, target);
- if (channel != NULL && g_strcasecmp(channel->name, target) != 0)
+ if (channel != NULL &&
+ g_ascii_strcasecmp(channel->name, target) != 0)
target = channel->name;
}
diff --git a/src/irc/core/massjoin.c b/src/irc/core/massjoin.c
index 1322db7d..6cc2b7c7 100644
--- a/src/irc/core/massjoin.c
+++ b/src/irc/core/massjoin.c
@@ -42,7 +42,7 @@ static void event_join(IRC_SERVER_REC *server, const char *data,
g_return_if_fail(data != NULL);
- if (g_strcasecmp(nick, server->nick) == 0) {
+ if (g_ascii_strcasecmp(nick, server->nick) == 0) {
/* You joined, no need to do anything here */
return;
}
@@ -104,7 +104,7 @@ static void event_part(IRC_SERVER_REC *server, const char *data,
g_return_if_fail(data != NULL);
- if (g_strcasecmp(nick, server->nick) == 0) {
+ if (g_ascii_strcasecmp(nick, server->nick) == 0) {
/* you left channel, no need to do anything here */
return;
}
@@ -140,7 +140,7 @@ static void event_quit(IRC_SERVER_REC *server, const char *data,
g_return_if_fail(data != NULL);
- if (g_strcasecmp(nick, server->nick) == 0) {
+ if (g_ascii_strcasecmp(nick, server->nick) == 0) {
/* you quit, don't do anything here */
return;
}
@@ -171,7 +171,7 @@ static void event_kick(IRC_SERVER_REC *server, const char *data)
params = event_get_params(data, 3, &channel, &nick, &reason);
- if (g_strcasecmp(nick, server->nick) == 0) {
+ if (g_ascii_strcasecmp(nick, server->nick) == 0) {
/* you were kicked, no need to do anything */
g_free(params);
return;
diff --git a/src/irc/core/mode-lists.c b/src/irc/core/mode-lists.c
index 875d25b9..73b7a6b2 100644
--- a/src/irc/core/mode-lists.c
+++ b/src/irc/core/mode-lists.c
@@ -53,7 +53,7 @@ BAN_REC *banlist_find(GSList *list, const char *ban)
for (tmp = list; tmp != NULL; tmp = tmp->next) {
BAN_REC *rec = tmp->data;
- if (g_strcasecmp(rec->ban, ban) == 0)
+ if (g_ascii_strcasecmp(rec->ban, ban) == 0)
return rec;
}
diff --git a/src/irc/core/modes.c b/src/irc/core/modes.c
index 3b1e7d21..7054182f 100644
--- a/src/irc/core/modes.c
+++ b/src/irc/core/modes.c
@@ -301,7 +301,7 @@ void modes_type_prefix(IRC_CHANNEL_REC *channel, const char *setby,
{
int umode = (unsigned char) mode;
- if (g_strcasecmp(channel->server->nick, arg) == 0) {
+ if (g_ascii_strcasecmp(channel->server->nick, arg) == 0) {
/* see if we need to update channel->chanop */
const char *prefix =
g_hash_table_lookup(channel->server->isupport, "PREFIX");
@@ -692,7 +692,7 @@ static int get_wildcard_nicks(GString *output, const char *mask,
(voice == 1 && !rec->voice) || (voice == 0 && rec->voice))
continue;
- if (g_strcasecmp(rec->nick, channel->server->nick) == 0)
+ if (g_ascii_strcasecmp(rec->nick, channel->server->nick) == 0)
continue;
g_string_append_printf(output, "%s ", rec->nick);
@@ -859,7 +859,7 @@ static void cmd_mode(const char *data, IRC_SERVER_REC *server,
} else if (ischannel(*target))
channel_set_mode(server, target, mode);
else {
- if (g_strcasecmp(target, server->nick) == 0) {
+ if (g_ascii_strcasecmp(target, server->nick) == 0) {
server_redirect_event(server, "mode user", 1, target, -1, NULL,
"event mode", "requested usermode change", NULL);
}
diff --git a/src/irc/core/netsplit.c b/src/irc/core/netsplit.c
index 706212ee..0642846f 100644
--- a/src/irc/core/netsplit.c
+++ b/src/irc/core/netsplit.c
@@ -43,8 +43,8 @@ static NETSPLIT_SERVER_REC *netsplit_server_find(IRC_SERVER_REC *server,
for (tmp = server->split_servers; tmp != NULL; tmp = tmp->next) {
NETSPLIT_SERVER_REC *rec = tmp->data;
- if (g_strcasecmp(rec->server, servername) == 0 &&
- g_strcasecmp(rec->destserver, destserver) == 0)
+ if (g_ascii_strcasecmp(rec->server, servername) == 0 &&
+ g_ascii_strcasecmp(rec->destserver, destserver) == 0)
return rec;
}
@@ -191,7 +191,7 @@ NETSPLIT_REC *netsplit_find(IRC_SERVER_REC *server, const char *nick,
if (rec == NULL) return NULL;
return (address == NULL ||
- g_strcasecmp(rec->address, address) == 0) ? rec : NULL;
+ g_ascii_strcasecmp(rec->address, address) == 0) ? rec : NULL;
}
NETSPLIT_CHAN_REC *netsplit_find_channel(IRC_SERVER_REC *server,
@@ -211,7 +211,7 @@ NETSPLIT_CHAN_REC *netsplit_find_channel(IRC_SERVER_REC *server,
for (tmp = rec->channels; tmp != NULL; tmp = tmp->next) {
NETSPLIT_CHAN_REC *rec = tmp->data;
- if (g_strcasecmp(rec->name, channel) == 0)
+ if (g_ascii_strcasecmp(rec->name, channel) == 0)
return rec;
}
@@ -315,7 +315,7 @@ static void event_join(IRC_SERVER_REC *server, const char *data,
/* check if split is over */
rec = g_hash_table_lookup(server->splits, nick);
- if (rec != NULL && g_strcasecmp(rec->address, address) == 0) {
+ if (rec != NULL && g_ascii_strcasecmp(rec->address, address) == 0) {
/* yep, looks like it is. for same people that had the same
splitted servers set the timeout to one minute.
@@ -350,7 +350,7 @@ static void event_quit(IRC_SERVER_REC *server, const char *data,
g_return_if_fail(data != NULL);
if (*data == ':') data++;
- if (g_strcasecmp(nick, server->nick) != 0 && quitmsg_is_split(data)) {
+ if (g_ascii_strcasecmp(nick, server->nick) != 0 && quitmsg_is_split(data)) {
/* netsplit! */
netsplit_add(server, nick, address, data);
}