diff options
author | Peter Powell <petpow@saberuk.com> | 2019-11-17 22:23:51 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-11-17 22:23:51 +0000 |
commit | 8be79c0797a8b12fc1990c09da275bc6f20a9c03 (patch) | |
tree | 86c738d5a71a96a972461eb6e557c991fb5b7e6d /src | |
parent | 687778b72e31322a73b2e2e17af6bd0f2a2561bc (diff) |
Make rehashing messages more consistent.
Diffstat (limited to 'src')
-rw-r--r-- | src/coremods/core_oper/cmd_rehash.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/coremods/core_oper/cmd_rehash.cpp b/src/coremods/core_oper/cmd_rehash.cpp index e234e54b4..6d09a3a84 100644 --- a/src/coremods/core_oper/cmd_rehash.cpp +++ b/src/coremods/core_oper/cmd_rehash.cpp @@ -64,13 +64,10 @@ CmdResult CommandRehash::Handle(User* user, const Params& parameters) // Rehash for me. Try to start the rehash thread if (!ServerInstance->ConfigThread) { - 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, FileSystem::GetFileName(ServerInstance->ConfigFileName), "Rehashing"); - else - ServerInstance->PI->SendUserNotice(user, "*** Rehashing server " + FileSystem::GetFileName(ServerInstance->ConfigFileName)); + const std::string configfile = FileSystem::GetFileName(ServerInstance->ConfigFileName); + user->WriteRemoteNumeric(RPL_REHASHING, configfile, "Rehashing " + ServerInstance->Config->ServerName); + ServerInstance->SNO->WriteGlobalSno('a', "%s is rehashing %s on %s", user->nick.c_str(), + configfile.c_str(), ServerInstance->Config->ServerName.c_str()); /* Don't do anything with the logs here -- logs are restarted * after the config thread has completed. @@ -83,10 +80,7 @@ CmdResult CommandRehash::Handle(User* user, const Params& parameters) * A rehash is already in progress! ahh shit. * XXX, todo: we should find some way to kill runaway rehashes that are blocking, this is a major problem for unrealircd users */ - if (IS_LOCAL(user)) - user->WriteNotice("*** Could not rehash: A rehash is already in progress."); - else - ServerInstance->PI->SendUserNotice(user, "*** Could not rehash: A rehash is already in progress."); + user->WriteRemoteNotice("*** Could not rehash: A rehash is already in progress."); } // Always return success so spanningtree forwards an incoming REHASH even if we failed |