]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_rehash.cpp
Remove a few unnecessary .c_str() calls
[user/henk/code/inspircd.git] / src / commands / cmd_rehash.cpp
index 3dc45403609571821bd070dadd9f7965f74c1f37..07183ec7db7f85ddba5456d28031b1cc8892c2c0 100644 (file)
@@ -75,24 +75,18 @@ CmdResult CommandRehash::Handle (const std::vector<std::string>& parameters, Use
        // Rehash for me. Try to start the rehash thread
        if (!ServerInstance->ConfigThread)
        {
-               std::string m = user->nick + " is rehashing config file " + ServerConfig::CleanFilename(ServerInstance->ConfigFileName.c_str()) + " on " + ServerInstance->Config->ServerName;
+               std::string m = user->nick + " is rehashing config file " + FileSystem::GetFileName(ServerInstance->ConfigFileName) + " on " + ServerInstance->Config->ServerName;
                ServerInstance->SNO->WriteGlobalSno('a', m);
 
                if (IS_LOCAL(user))
-                       user->WriteNumeric(RPL_REHASHING, "%s %s :Rehashing",
-                               user->nick.c_str(),ServerConfig::CleanFilename(ServerInstance->ConfigFileName.c_str()));
+                       user->WriteNumeric(RPL_REHASHING, "%s :Rehashing", FileSystem::GetFileName(ServerInstance->ConfigFileName).c_str());
                else
-                       ServerInstance->PI->SendUserNotice(user, std::string("*** Rehashing server ") +
-                               ServerConfig::CleanFilename(ServerInstance->ConfigFileName.c_str()));
+                       ServerInstance->PI->SendUserNotice(user, "*** Rehashing server " + FileSystem::GetFileName(ServerInstance->ConfigFileName));
 
                /* Don't do anything with the logs here -- logs are restarted
                 * after the config thread has completed.
                 */
-               FOREACH_MOD(OnGarbageCollect, ());
-
-
-               ServerInstance->ConfigThread = new ConfigReaderThread(user->uuid);
-               ServerInstance->Threads->Start(ServerInstance->ConfigThread);
+               ServerInstance->Rehash(user->uuid);
        }
        else
        {