diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-09 13:33:57 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-09 13:33:57 +0000 |
commit | 4754d3371f209ce31ca417a8c557e29805d3cc49 (patch) | |
tree | 7183be150dc63ea0baa7d968c4936067b862358a /src/wildcard.cpp | |
parent | 1485bcaf19fde3a8961ffdc8ade2e699aae3788e (diff) |
Fixed matching
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1022 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/wildcard.cpp')
-rw-r--r-- | src/wildcard.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wildcard.cpp b/src/wildcard.cpp index 8b4190539..47fbaf002 100644 --- a/src/wildcard.cpp +++ b/src/wildcard.cpp @@ -101,6 +101,17 @@ bool match(const char* literal, const char* mask) strlcpy(M,mask,10240); strlower(L); strlower(M); + // short circuit literals + log(DEBUG,"Match '%s' to '%s'",L,M); + if ((!strchr(M,'*')) && (!strchr(M,'?'))) + { + log(DEBUG,"Short circuiting literal"); + if (!strcasecmp(L,M)) + { + log(DEBUG,"Literal match"); + return true; + } + } match2(L,M); return (MWC == 2); } |