* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
+ * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
* E-mail:
* <brain@chatspike.net>
* <Craig@chatspike.net>
* ---------------------------------------------------
*/
+using namespace std;
+
#include <string>
#include "inspircd_config.h"
#include "inspircd.h"
+#include "helperfuncs.h"
#include "inspstring.h"
+extern char lowermap[255];
+
// Wed 27 Apr 2005 - Brain
// I've taken our our old wildcard routine -
// although comprehensive, it was topheavy and very
char *cp, *mp;
while ((*string) && (*wild != '*'))
{
- if ((*wild != *string) && (*wild != '?'))
+ if ((lowermap[(unsigned)*wild] != lowermap[(unsigned)*string]) && (*wild != '?'))
{
return 0;
}
cp = string+1;
}
else
- if ((*wild == *string) || (*wild == '?'))
+ if ((lowermap[(unsigned)*wild] == lowermap[(unsigned)*string]) || (*wild == '?'))
{
wild++;
string++;
bool match(const char* literal, const char* mask)
{
- static char L[10240];
- static char M[10240];
- strlcpy(L,literal,10240);
- strlcpy(M,mask,10240);
- strlower(L);
- strlower(M);
- return wildcmp(M,L);
+ return wildcmp((char*)mask, (char*)literal);
}
+