diff options
author | Timo Sirainen <cras@irssi.org> | 2001-02-19 12:10:36 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-02-19 12:10:36 +0000 |
commit | bd92708f22974dd203541f50acdf8c034e41a950 (patch) | |
tree | f4b9927f15c10cb8ca55966e54571225763cb42e /src | |
parent | 374df6c5f16404cb541566d32b52e094ede6d295 (diff) | |
download | irssi-bd92708f22974dd203541f50acdf8c034e41a950.zip |
level_get() check wasn't case-insensitive
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1260 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/core/levels.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/levels.c b/src/core/levels.c index d6f3f1ef..8838ac07 100644 --- a/src/core/levels.c +++ b/src/core/levels.c @@ -53,10 +53,10 @@ int level_get(const char *level) { int n, len, match; - if (strcmp(level, "ALL") == 0) + if (g_strcasecmp(level, "ALL") == 0) return MSGLEVEL_ALL; - if (strcmp(level, "NEVER") == 0) + if (g_strcasecmp(level, "NEVER") == 0) return MSGLEVEL_NEVER; len = strlen(level); @@ -65,7 +65,7 @@ int level_get(const char *level) /* partial match allowed, as long as it's the only one that matches */ match = 0; for (n = 0; levels[n] != NULL; n++) { - if (strncmp(levels[n], level, len) == 0) { + if (g_strncasecmp(levels[n], level, len) == 0) { if ((int)strlen(levels[n]) == len) { /* full match */ return 1L << n; @@ -92,7 +92,6 @@ int level2bits(const char *level) return 0; orig = str = g_strdup(level); - g_strup(str); ret = 0; for (ptr = str; ; str++) { |