]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/wildcard.cpp
Added documentation to manpages of Request, Event and ModuleMessage
[user/henk/code/inspircd.git] / src / wildcard.cpp
index ce4d7d3147f549332dba73a512c837f5d2e6ab5d..123abc500bf85fa81991f9db42458ef67508833b 100644 (file)
@@ -17,6 +17,7 @@
 #include <string>
 #include "inspircd_config.h"
 #include "inspircd.h"
+#include "inspstring.h"
 
 void Delete(char* str,int pos)
 {
@@ -100,6 +101,15 @@ 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,'?')))
+       {
+               if (!strcasecmp(L,M))
+               {
+                       return true;
+               }
+       }
        match2(L,M);
        return (MWC == 2);
 }