From d49248c7fe1ca4e595505f3352ca9c6dd9d0d31c Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 8 Nov 2000 23:40:34 +0000 Subject: 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 --- src/core/levels.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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; -- cgit v1.2.3