1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
7 * <brain@chatspike.net>
8 * <Craig@chatspike.net>
10 * Written by Craig Edwards, Craig McLure, and others.
11 * This program is free but copyrighted software; see
12 * the file COPYING for details.
14 * ---------------------------------------------------
17 #include "inspircd_config.h"
18 #include "configreader.h"
22 #include "helperfuncs.h"
23 #include "commands/cmd_rehash.h"
25 extern ServerConfig* Config;
27 extern ModuleList modules;
28 extern FactoryList factory;
30 void cmd_rehash::Handle (char **parameters, int pcnt, userrec *user)
32 WriteServ(user->fd,"382 %s %s :Rehashing",user->nick,CleanFilename(CONFIG_FILE));
33 std::string parameter = "";
36 parameter = parameters[0];
40 WriteOpers("%s is rehashing config file %s",user->nick,CleanFilename(CONFIG_FILE));
41 Config->Read(false,user);
43 FOREACH_MOD(I_OnRehash,OnRehash(parameter));