X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommand_parse.cpp;h=ab935559d9be0374bc972ad0e9a017eae8ff45ba;hb=234c7cd851229d94eb8c26a8a68ca6967f20aff8;hp=ae580c6a72628251373226fee082ccb0596d0b41;hpb=e6fa614ad27cd68aa61605ca0884eee9c44384eb;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/command_parse.cpp b/src/command_parse.cpp index ae580c6a7..ab935559d 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -14,8 +14,6 @@ #include "inspircd.h" #include "configreader.h" #include -#include -#include #include "users.h" #include "modules.h" #include "wildcard.h" @@ -24,6 +22,12 @@ #include "socket.h" #include "command_parse.h" +/* Directory Searching for Unix-Only */ +#ifndef WIN32 +#include +#include +#endif + bool InspIRCd::ULine(const char* server) { if (!server) @@ -323,12 +327,12 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd) { if (!user->IsModeSet(cm->second->flags_needed)) { - user->WriteServ("481 %s :Permission Denied- You do not have the required operator privileges",user->nick); + user->WriteServ("481 %s :Permission Denied - You do not have the required operator privileges",user->nick); return; } if (!user->HasPermission(command)) { - user->WriteServ("481 %s :Permission Denied- Oper type %s does not have access to command %s",user->nick,user->oper,command.c_str()); + user->WriteServ("481 %s :Permission Denied - Oper type %s does not have access to command %s",user->nick,user->oper,command.c_str()); return; } } @@ -426,7 +430,7 @@ void CommandParser::ProcessBuffer(std::string &buffer,userrec *user) { if (!user->muted) { - ServerInstance->Log(DEBUG,"-> :%s %s",user->nick,buffer.c_str()); + ServerInstance->Log(DEBUG,"C[%d] -> :%s %s",user->GetFd(), user->nick, buffer.c_str()); this->ProcessCommand(user,buffer); } } @@ -464,7 +468,7 @@ bool CommandParser::FindSym(void** v, void* h) { *v = dlsym(h, "init_command"); const char* err = dlerror(); - if (err) + if (err && !(*v)) { ServerInstance->Log(SPARSE, "Error loading core command: %s\n", err); return false; @@ -549,6 +553,9 @@ void CommandParser::SetupCommandTable() { RFCCommands.clear(); + printf("\nLoading core commands"); + fflush(stdout); + DIR* library = opendir(LIBRARYDIR); if (library) { @@ -557,10 +564,13 @@ void CommandParser::SetupCommandTable() { if (match(entry->d_name, "cmd_*.so")) { + printf("."); + fflush(stdout); this->LoadCommand(entry->d_name); } } closedir(library); + printf("\n"); } this->CreateCommand(new cmd_reload(ServerInstance));