]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_who.cpp
Fix fuzzy matching in core_who.
[user/henk/code/inspircd.git] / src / coremods / core_who.cpp
index fdf8919a22e33a6c2af29001d535546b52d2f5c9..135504b84ce73cb1132908a462b2ead217f7ff62 100644 (file)
@@ -77,9 +77,6 @@ struct WhoData : public Who::Request
                if (matchtext == "0")
                        matchtext = "*";
 
-               // Fuzzy matches are when the source has not specified a specific user.
-               fuzzy_match = (parameters.size() > 1) || (matchtext.find_first_of("*?.") != std::string::npos);
-
                // If flags have been specified by the source.
                if (parameters.size() > 1)
                {
@@ -108,6 +105,9 @@ struct WhoData : public Who::Request
                                current_bitset->set(chr);
                        }
                }
+
+               // Fuzzy matches are when the source has not specified a specific user.
+               fuzzy_match = flags.any() || (matchtext.find_first_of("*?.") != std::string::npos);
        }
 };