summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-30 15:35:15 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-30 15:35:15 +0000
commit5a331966832a930d4770752f5e60338581830887 (patch)
tree484adbd474ba9b0f206b89e31969b245221f570a
parent596e41348f06cab088e35c362393a3140bf161b0 (diff)
Added Server::RehashServer
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2060 e03df62e-2008-0410-955e-edbf42e46eb7
-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++)