diff options
-rw-r--r-- | include/commands.h | 1 | ||||
-rw-r--r-- | include/inspircd_io.h | 1 | ||||
-rw-r--r-- | src/commands.cpp | 6 | ||||
-rw-r--r-- | src/inspircd_io.cpp | 11 |
4 files changed, 12 insertions, 7 deletions
diff --git a/include/commands.h b/include/commands.h index 8cd1361ee..de2f2c6c7 100644 --- a/include/commands.h +++ b/include/commands.h @@ -28,7 +28,6 @@ #include "users.h" #include "channels.h" -char* CleanFilename(char* name); bool is_uline(const char* server); long duration(const char* str); void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long idle, char* nick); diff --git a/include/inspircd_io.h b/include/inspircd_io.h index 19fce0847..0ef477ab5 100644 --- a/include/inspircd_io.h +++ b/include/inspircd_io.h @@ -320,5 +320,6 @@ int OpenTCPSocket (void); int BindSocket (int sockfd, struct sockaddr_in client, struct sockaddr_in server, int port, char* addr); void WritePID(std::string filename); int BindPorts(); +char* CleanFilename(char* name); #endif diff --git a/src/commands.cpp b/src/commands.cpp index de8d87318..e9b921beb 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -89,12 +89,6 @@ extern std::vector<userrec*> local_users; // by an integer, meaning there is no need for a scan/search operation. extern userrec* fd_ref_table[MAX_DESCRIPTORS]; -char* CleanFilename(char* name) -{ - char* p = name + strlen(name); - while ((p != name) && (*p != '/')) p--; - return (p != name ? ++p : p); -} void split_chlist(userrec* user, userrec* dest, std::string &cl) { 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)); |