X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fu_listmode.h;h=a728eb8397e3c1a21552731bd585a762c79794b8;hb=fc4fc43ec232407b38d7ca182cb92c5cac4287aa;hp=b370c86e864d4ea513820556e0b7867968b9825d;hpb=84a1569cd60daa64b1ae52a1fff62c0dc4d78850;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/u_listmode.h b/src/modules/u_listmode.h index b370c86e8..a728eb839 100644 --- a/src/modules/u_listmode.h +++ b/src/modules/u_listmode.h @@ -201,13 +201,13 @@ class ListModeBase : public ModeHandler if (limit.mask.size() && limit.limit > 0) chanlimits.push_back(limit); } - if (chanlimits.size() == 0) - { - ListLimit limit; - limit.mask = "*"; - limit.limit = 64; - chanlimits.push_back(limit); - } + + // Add the default entry. This is inserted last so if the user specifies a + // wildcard record in the config it will take precedence over this entry. + ListLimit limit; + limit.mask = "*"; + limit.limit = 64; + chanlimits.push_back(limit); } /** Populate the Implements list with the correct events for a List Mode @@ -294,6 +294,8 @@ class ListModeBase : public ModeHandler return MODEACTION_DENY; } } + else + break; } } @@ -316,7 +318,7 @@ class ListModeBase : public ModeHandler if (parameter == it->mask) { el->erase(it); - if (el->size() == 0) + if (el->empty()) { extItem.unset(channel); }