diff options
author | LemonBoy <thatlemon@gmail.com> | 2018-03-08 20:35:00 +0100 |
---|---|---|
committer | LemonBoy <thatlemon@gmail.com> | 2018-03-08 20:35:00 +0100 |
commit | fb9f5174c2f85c113dac8dbc1d146fe530e53e44 (patch) | |
tree | fcfd1583a1750552d7899f743fae74eacf392b91 /src/core/channels-setup.c | |
parent | 1178f753cf07cbbfd000d6b0fccf5a5dd7b54b5b (diff) | |
download | irssi-fb9f5174c2f85c113dac8dbc1d146fe530e53e44.zip |
Compare channels/networks fields case-insensitively
Fixes #856
Diffstat (limited to 'src/core/channels-setup.c')
-rw-r--r-- | src/core/channels-setup.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/channels-setup.c b/src/core/channels-setup.c index 4966d77d..8002646d 100644 --- a/src/core/channels-setup.c +++ b/src/core/channels-setup.c @@ -37,9 +37,14 @@ static int compare_channel_setup (CONFIG_NODE *node, CHANNEL_SETUP_REC *channel) name = config_node_get_str(node, "name", NULL); chatnet = config_node_get_str(node, "chatnet", NULL); - if (g_strcmp0(name, channel->name) != 0 || - g_strcmp0(chatnet, channel->chatnet) != 0) + if (name == NULL || chatnet == NULL) { + return 0; + } + + if (g_ascii_strcasecmp(name, channel->name) != 0 || + g_ascii_strcasecmp(chatnet, channel->chatnet) != 0) { return 1; + } return 0; } |