]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Match with the right args at least..
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 22 Aug 2008 17:39:00 +0000 (17:39 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 22 Aug 2008 17:39:00 +0000 (17:39 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10218 e03df62e-2008-0410-955e-edbf42e46eb7

src/command_parse.cpp
src/wildcard.cpp

index 4063edf385246e0f67387a17a9bfdf3c63158b00..cdac83a24d8611d49168f655bcd45f94b7db334f 100644 (file)
@@ -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)
index e717b0ad4d5ec4384748376f8c1ea7bd5a5b3ae7..4d8d94eb42e3c0633f3f35d29e60b64d03a4a55d 100644 (file)
 #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);
 }