1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

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
This commit is contained in:
Timo Sirainen 2000-11-08 23:40:34 +00:00 committed by cras
parent 39811fb47d
commit d49248c7fe

View File

@ -66,6 +66,10 @@ int level_get(const char *level)
match = 0; match = 0;
for (n = 0; levels[n] != NULL; n++) { for (n = 0; levels[n] != NULL; n++) {
if (strncmp(levels[n], level, len) == 0) { if (strncmp(levels[n], level, len) == 0) {
if (strlen(levels[n]) == len) {
/* full match */
return 1L << n;
}
if (match > 0) { if (match > 0) {
/* ambiguous - abort */ /* ambiguous - abort */
return 0; return 0;