]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_rehash.cpp
Fix <options:noservices> causing +o (and +q!) not being correctly given on channel...
[user/henk/code/inspircd.git] / src / commands / cmd_rehash.cpp
index 4d1f4742cf69cc20765627d1588357815a5d9f96..ebbb7c9bd7d1a8ec5619684441985f8bb10e900b 100644 (file)
@@ -28,7 +28,7 @@ CmdResult CommandRehash::Handle (const std::vector<std::string>& parameters, Use
 
        if (parameters.size() && parameters[0][0] != '-')
        {
-               if (!ServerInstance->MatchText(ServerInstance->Config->ServerName, parameters[0]))
+               if (!InspIRCd::Match(ServerInstance->Config->ServerName, parameters[0]))
                {
                        FOREACH_MOD(I_OnRehash,OnRehash(user, parameters[0]));
                        return CMD_SUCCESS; // rehash for a server, and not for us
@@ -46,7 +46,7 @@ CmdResult CommandRehash::Handle (const std::vector<std::string>& parameters, Use
        if (IS_LOCAL(user))
                user->WriteNumeric(RPL_REHASHING, "%s %s :Rehashing",user->nick.c_str(),ServerConfig::CleanFilename(ServerInstance->ConfigFileName));
        else
-               ServerInstance->PI->SendUserNotice(user, "*** Rehashing server %s", ServerInstance->ConfigFileName);
+               ServerInstance->PI->SendUserNotice(user, std::string("*** Rehashing server ") + ServerInstance->ConfigFileName);
 
 
        std::string m = user->nick + " is rehashing config file " + ServerConfig::CleanFilename(ServerInstance->ConfigFileName) + " on " + ServerInstance->Config->ServerName;
@@ -64,10 +64,10 @@ CmdResult CommandRehash::Handle (const std::vector<std::string>& parameters, Use
 
        if (!ServerInstance->ConfigThread)
        {
-               ServerInstance->Config->RehashUser = user;
+               ServerInstance->Config->RehashUserUID = user->uuid;
                ServerInstance->Config->RehashParameter = parameters.size() ? parameters[0] : "";
 
-               ServerInstance->ConfigThread = new ConfigReaderThread(ServerInstance, false, user);
+               ServerInstance->ConfigThread = new ConfigReaderThread(ServerInstance, false, ServerInstance->Config->RehashUserUID);
                ServerInstance->Threads->Create(ServerInstance->ConfigThread);
        }
        else