From 670247683cae887bd2420762bf39b6d17e73c3ff Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 11 Aug 2007 12:17:07 +0000 Subject: Fix this so it works. OBVIOUS WARNING FOR THE DUMB: Dont go overwriting .so files at random to test this, you WILL crash your ircd if you do this improprerly, this is a feature of the linux shared object loader. If you want to test this, try with: rm cmd_whatever.so && echo "TESTTEST" >cmd_whatever.so, do NOT just do the echo. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7713 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/command_parse.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/command_parse.cpp') diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 4e374d622..10421a346 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -445,7 +445,6 @@ bool CommandParser::CreateCommand(command_t *f, void* so_handle) CommandParser::CommandParser(InspIRCd* Instance) : ServerInstance(Instance) { para.resize(128); - this->SetupCommandTable(NULL); } bool CommandParser::FindSym(void** v, void* h) @@ -525,7 +524,10 @@ const char* CommandParser::LoadCommand(const char* name) /* Command already exists? Succeed silently - this is needed for REHASH */ if (RFCCommands.find(name) != RFCCommands.end()) + { + ServerInstance->Log(DEBUG,"Not reloading command %s/%s, it already exists", LIBRARYDIR, name); return NULL; + } snprintf(filename, MAXBUF, "%s/%s", LIBRARYDIR, name); h = dlopen(filename, RTLD_NOW | RTLD_GLOBAL); @@ -573,7 +575,7 @@ void CommandParser::SetupCommandTable(userrec* user) { if (user) { - user->WriteServ("NOTICE %s :*** Failed to load core command %s: %s", entry->d_name, err); + user->WriteServ("NOTICE %s :*** Failed to load core command %s: %s", user->nick, entry->d_name, err); } else { -- cgit v1.2.3