mirror of
https://github.com/irssi/irssi.git
synced 2026-08-19 00:22:17 +02: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:
parent
39811fb47d
commit
d49248c7fe
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue