- ServerInstance->ConfigThread = new ConfigReaderThread(ServerInstance, false, user);
- ServerInstance->Threads->Create(ServerInstance->ConfigThread);
- }
+ ServerInstance->RehashUsersAndChans();
+ FOREACH_MOD(I_OnGarbageCollect, OnGarbageCollect());
+
+ if (!ServerInstance->ConfigThread)
+ {
+ ServerInstance->Config->RehashUserUID = user->uuid;
+ ServerInstance->Config->RehashParameter = parameters.size() ? parameters[0] : "";
+
+ ServerInstance->ConfigThread = new ConfigReaderThread(ServerInstance, false, ServerInstance->Config->RehashUserUID);
+ ServerInstance->Threads->Create(ServerInstance->ConfigThread);
+ }
+ else
+ {
+ /*
+ * 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->WriteServ("NOTICE %s :*** Could not rehash: A rehash is already in progress.", user->nick.c_str());