#include "inspircd.h"
#include "configreader.h"
#include <algorithm>
-#include <dirent.h>
-#include <dlfcn.h>
#include "users.h"
#include "modules.h"
#include "wildcard.h"
#include "socket.h"
#include "command_parse.h"
+/* Directory Searching for Unix-Only */
+#ifndef WIN32
+#include <dirent.h>
+#include <dlfcn.h>
+#endif
+
bool InspIRCd::ULine(const char* server)
{
if (!server)
{
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;
}
}
{
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);
}
}
{
*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;
{
RFCCommands.clear();
+ printf("\nLoading core commands");
+ fflush(stdout);
+
DIR* library = opendir(LIBRARYDIR);
if (library)
{
{
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));