From: Peter Powell Date: Sun, 3 Aug 2014 09:35:31 +0000 (+0100) Subject: Fix listmodes when the config does not specify a wildcard size entry. X-Git-Tag: v2.0.23~152^2 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=234be2f3cb00735ec07c9df749a0d53effce5f65;p=user%2Fhenk%2Fcode%2Finspircd.git Fix listmodes when the config does not specify a wildcard size entry. --- diff --git a/src/modules/u_listmode.h b/src/modules/u_listmode.h index 0f5903e53..30bf6a48f 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.empty()) - { - 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