diff options
-rw-r--r-- | src/command_parse.cpp | 4 | ||||
-rw-r--r-- | src/wildcard.cpp | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 4063edf38..cdac83a24 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -544,7 +544,7 @@ void CommandParser::SetupCommandTable(User* user) dirent* entry = NULL; while (0 != (entry = readdir(library))) { - if (InspIRCd::Match(entry->d_name, "cmd_*.so", NULL)) + if (InspIRCd::Match(entry->d_name, "cmd_*.so")) { if (!user) { @@ -565,6 +565,8 @@ void CommandParser::SetupCommandTable(User* user) } } } + else + printf("NOT loading %s, not a cmd\n", entry->d_name); } closedir(library); if (!user) diff --git a/src/wildcard.cpp b/src/wildcard.cpp index e717b0ad4..4d8d94eb4 100644 --- a/src/wildcard.cpp +++ b/src/wildcard.cpp @@ -17,11 +17,12 @@ #include "hashcomp.h" #include "inspstring.h" +#include <iostream> /* * Wildcard matching, the third (and probably final) iteration! * */ -static bool match_internal(const unsigned char *str, const unsigned char *mask, unsigned const char *map) +static bool match_internal(const unsigned char *mask, const unsigned char *str, unsigned const char *map) { const unsigned char *wild = str; const unsigned char *string = mask; @@ -73,6 +74,10 @@ static bool match_internal(const unsigned char *str, const unsigned char *mask, wild++; } + if (*wild == 0) + std::cout << "*wild == 0\n"; + else + std::cout << "*wild != 0\n"; return (*wild == 0); } |