]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix listmodes when the config does not specify a wildcard size entry.
authorPeter Powell <petpow@saberuk.com>
Sun, 3 Aug 2014 09:35:31 +0000 (10:35 +0100)
committerPeter Powell <petpow@saberuk.com>
Sun, 3 Aug 2014 09:35:31 +0000 (10:35 +0100)
src/modules/u_listmode.h

index 0f5903e53acc3543ffc185d2a247146254ade24d..30bf6a48fb71619e16b368f061e2bef46e97dec0 100644 (file)
@@ -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