summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/modules.h2
-rw-r--r--src/commands.cpp5
-rw-r--r--src/inspircd.cpp2
-rw-r--r--src/modules.cpp6
4 files changed, 13 insertions, 2 deletions
diff --git a/include/modules.h b/include/modules.h
index 69f020754..dd141ae61 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -1121,6 +1121,8 @@ class Server : public classbase
/** Deletes a class derived from InspSocket from the server's socket engine.
*/
virtual void DelSocket(InspSocket* sock);
+
+ virtual void RehashServer();
};
diff --git a/src/commands.cpp b/src/commands.cpp
index 518ecd71e..82a6a2237 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -1076,7 +1076,10 @@ void handle_rehash(char **parameters, int pcnt, userrec *user)
{
WriteServ(user->fd,"382 %s %s :Rehashing",user->nick,CleanFilename(CONFIG_FILE));
ReadConfig(false,user);
- FOREACH_MOD OnRehash();
+ std::string parameter = "";
+ if (pcnt)
+ parameter = parameters[0];
+ FOREACH_MOD OnRehash(parameter);
WriteOpers("%s is rehashing config file %s",user->nick,CleanFilename(CONFIG_FILE));
}
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index dd151283a..a946abbbb 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -293,7 +293,7 @@ void ReadConfig(bool bail, userrec* user)
}
else
{
- WriteOpers("There were errors in the configuration file:",user->nick);
+ WriteOpers("There were errors in the configuration file:");
while (!errstr.eof())
{
errstr.getline(dataline,1024);
diff --git a/src/modules.cpp b/src/modules.cpp
index a1c9ca811..0541c266d 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -384,6 +384,12 @@ void Server::AddSocket(InspSocket* sock)
module_sockets.push_back(sock);
}
+void Server::RehashServer()
+{
+ WriteOpers("*** Rehashing config file");
+ ReadConfig(false,NULL);
+}
+
void Server::DelSocket(InspSocket* sock)
{
for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++)