]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/command_parse.cpp
Bad Brain, bad. *spank* :p
[user/henk/code/inspircd.git] / src / command_parse.cpp
index 54a077b828aeaac4a3ab6c489309f3672ad88d12..30865f414a875559f3b6dde304bf1aee7d75e956 100644 (file)
@@ -358,8 +358,7 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
                                        return;
 
                                /*
-                                * WARNING: nothing should come after this, as the user may be on a cull list to
-                                * be nuked next loop iteration. be sensible.
+                                * WARNING: be careful, the user may be deleted soon
                                 */
                                CmdResult result = cm->second->Handle(command_p,items,user);
 
@@ -426,7 +425,7 @@ void CommandParser::ProcessBuffer(std::string &buffer,userrec *user)
        {
                if (!user->muted)
                {
-                       ServerInstance->Log(DEBUG,"C[%d] -> :%s %s",user->GetFd(), user->nick, buffer.c_str());
+                       ServerInstance->Log(DEBUG,"C[%d] I :%s %s",user->GetFd(), user->nick, buffer.c_str());
                        this->ProcessCommand(user,buffer);
                }
        }
@@ -459,13 +458,13 @@ CommandParser::CommandParser(InspIRCd* Instance) : ServerInstance(Instance)
        para.resize(128);
 }
 
-bool CommandParser::FindSym(void** v, void* h)
+bool CommandParser::FindSym(void** v, void* h, const std::string &name)
 {
        *v = dlsym(h, "init_command");
        const char* err = dlerror();
        if (err && !(*v))
        {
-               ServerInstance->Log(SPARSE, "Error loading core command: %s\n", err);
+               ServerInstance->Log(SPARSE, "Error loading core command %s: %s\n", name.c_str(), err);
                return false;
        }
        return true;
@@ -547,11 +546,11 @@ const char* CommandParser::LoadCommand(const char* name)
        if (!h)
        {
                const char* n = dlerror();
-               ServerInstance->Log(SPARSE, "Error loading core command: %s", n);
+               ServerInstance->Log(SPARSE, "Error loading core command %s: %s", name, n);
                return n;
        }
 
-       if (this->FindSym((void **)&cmd_factory_func, h))
+       if (this->FindSym((void **)&cmd_factory_func, h, name))
        {
                command_t* newcommand = cmd_factory_func(ServerInstance);
                this->CreateCommand(newcommand, h);