summaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-14 21:16:44 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-14 21:16:44 +0000
commit45776df702235ec38625403778daff4c7aed4e4e (patch)
tree123695e3f32f909f8d7963545b4e449ec392c8f3 /src/command_parse.cpp
parent71532e29af6d0be878596e47dbd66a6ce573893d (diff)
Make error messages on failure to load command more useful
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8194 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index c273e0859..e751db6d3 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -458,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, err);
return false;
}
return true;
@@ -546,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);