diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-14 18:28:23 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-14 18:28:23 +0000 |
commit | 70f135207c36463878ab3c6e5d397f59c4ab0faa (patch) | |
tree | 80f1d0c6b72e2ec948ccb0318b7e017b6d50593d | |
parent | c76bb1695fce08aa75ad6ba706cb203e28b75652 (diff) |
Code tidying
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2440 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/channels.cpp | 4 | ||||
-rw-r--r-- | src/commands.cpp | 7 | ||||
-rw-r--r-- | src/inspircd.cpp | 2 | ||||
-rw-r--r-- | src/modules.cpp | 10 | ||||
-rw-r--r-- | src/userprocess.cpp | 6 |
5 files changed, 5 insertions, 24 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index f1c01b407..d1bb4b8a3 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -62,10 +62,6 @@ extern std::vector<Module*> modules; extern std::vector<ircd_module*> factory; extern int WHOWAS_STALE; extern int WHOWAS_MAX; -extern time_t startup_time; -extern std::vector<std::string> module_names; -extern int boundPortCount; -extern std::stringstream config_f; extern time_t TIME; extern chan_hash chanlist; diff --git a/src/commands.cpp b/src/commands.cpp index a58cf6ad0..470ba0b09 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -65,13 +65,11 @@ using namespace std; extern SocketEngine* SE; extern ServerConfig* Config; +extern InspIRCd* ServerInstance; extern int MODCOUNT; extern std::vector<Module*> modules; extern std::vector<ircd_module*> factory; -extern int WHOWAS_STALE; -extern int WHOWAS_MAX; -extern time_t startup_time; extern time_t TIME; const long duration_m = 60; @@ -84,7 +82,6 @@ extern user_hash clientlist; extern chan_hash chanlist; extern whowas_hash whowas; extern command_table cmdlist; -extern address_cache IP; extern std::vector<userrec*> all_opers; @@ -1475,7 +1472,7 @@ void handle_stats(char **parameters, int pcnt, userrec *user) { time_t current_time = 0; current_time = TIME; - time_t server_uptime = current_time - startup_time; + time_t server_uptime = current_time - ServerInstance->startup_time; struct tm* stime; stime = gmtime(&server_uptime); /* i dont know who the hell would have an ircd running for over a year nonstop, but diff --git a/src/inspircd.cpp b/src/inspircd.cpp index d4a4c85cb..4b4b3bfbe 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -479,8 +479,6 @@ InspIRCd::InspIRCd(int argc, char** argv) BoundPortCount = BindPorts(); printf("\n"); - startup_time = time(NULL); - if (!Config->nofork) { if (DaemonSeed() == ERROR) diff --git a/src/modules.cpp b/src/modules.cpp index 80145ebee..e2c131780 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -52,27 +52,19 @@ using namespace std; extern SocketEngine* SE; extern ServerConfig *Config; +extern InspIRCd* ServerInstance; extern int MODCOUNT; extern std::vector<Module*> modules; extern std::vector<ircd_module*> factory; extern std::vector<InspSocket*> module_sockets; extern time_t TIME; -extern int WHOWAS_STALE; -extern int WHOWAS_MAX; -extern time_t startup_time; -extern int boundPortCount; -extern int portCount; -extern int ports[MAXSOCKS]; - class Server; extern userrec* fd_ref_table[65536]; extern user_hash clientlist; extern chan_hash chanlist; -extern whowas_hash whowas; extern command_table cmdlist; -extern address_cache IP; ExtModeList EMode; // returns true if an extended mode character is in use diff --git a/src/userprocess.cpp b/src/userprocess.cpp index 30a601a7a..d67a85e78 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -60,17 +60,16 @@ using namespace std; #include "typedefs.h" extern int MODCOUNT; -extern int openSockfd[MAXSOCKS]; extern struct sockaddr_in client,server; extern socklen_t length; extern std::vector<Module*> modules; extern std::vector<ircd_module*> factory; extern std::vector<InspSocket*> module_sockets; -extern SocketEngine* SE; extern time_t TIME; extern time_t OLDTIME; -extern time_t startup_time; +extern InspIRCd* ServerInstance; +extern SocketEngine* SE; extern serverstats* stats; extern ServerConfig *Config; @@ -79,7 +78,6 @@ char data[65536]; extern user_hash clientlist; extern chan_hash chanlist; -extern whowas_hash whowas; void ProcessUser(userrec* cu) { |