summaryrefslogtreecommitdiff
path: root/src/inspircd_io.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-15 20:35:11 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-15 20:35:11 +0000
commitd920a2506f430ac466d2e9e33a4810c7dd92534d (patch)
treeef84186c37869f5134a9b587664a89505f31c7b1 /src/inspircd_io.cpp
parent67b93b1938685bc30e3d6b6f46699c65bbab1694 (diff)
CleanFilename movage
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2807 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd_io.cpp')
-rw-r--r--src/inspircd_io.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp
index e6dfc71b1..b71fc2f1e 100644
--- a/src/inspircd_io.cpp
+++ b/src/inspircd_io.cpp
@@ -37,6 +37,9 @@ extern InspIRCd* ServerInstance;
extern int openSockfd[MAXSOCKS];
extern time_t TIME;
+extern int MODCOUNT;
+extern std::vector<Module*> modules;
+extern std::vector<ircd_module*> factory;
ServerConfig::ServerConfig()
{
@@ -410,6 +413,14 @@ void Killed(int status)
exit(status);
}
+char* CleanFilename(char* name)
+{
+ char* p = name + strlen(name);
+ while ((p != name) && (*p != '/')) p--;
+ return (p != name ? ++p : p);
+}
+
+
void Rehash(int status)
{
WriteOpers("Rehashing config file %s due to SIGHUP",CleanFilename(CONFIG_FILE));