summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-11-08 23:40:34 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-11-08 23:40:34 +0000
commitd49248c7fe1ca4e595505f3352ca9c6dd9d0d31c (patch)
treed17f6fc98b5accd9f8454212d8d467312ee09bbf /src
parent39811fb47dc743dcbda07183584b729853004857 (diff)
downloadirssi-d49248c7fe1ca4e595505f3352ca9c6dd9d0d31c.zip
level_get() didn't check ambiguous commands correctly - dcc always failed
because it was partial for dccmsgs. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@817 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/core/levels.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/levels.c b/src/core/levels.c
index 35a9a7ed..1c526b1a 100644
--- a/src/core/levels.c
+++ b/src/core/levels.c
@@ -66,6 +66,10 @@ int level_get(const char *level)
match = 0;
for (n = 0; levels[n] != NULL; n++) {
if (strncmp(levels[n], level, len) == 0) {
+ if (strlen(levels[n]) == len) {
+ /* full match */
+ return 1L << n;
+ }
if (match > 0) {
/* ambiguous - abort */
return 0;