summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 21:19:19 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-10 21:19:19 +0000
commitd02a5866d4fdedec9219aeca0a6048828b394fd2 (patch)
tree1810181d59b71cba1ca68bfb8b3f9252f3c57caa /src/helperfuncs.cpp
parent23a4885701cba4a87a5ae027257fb4207c917572 (diff)
Mass-tidyup of module global vars, theyre no longer global vars.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4856 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index a6c4f1f5e..dc6c3e00d 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -43,15 +43,9 @@
#include "typedefs.h"
#include "inspircd.h"
-extern int MODCOUNT;
-extern ModuleList modules;
-
extern time_t TIME;
-extern char lowermap[255];
extern std::vector<userrec*> all_opers;
-char LOG_FILE[MAXBUF];
-
static char TIMESTR[26];
static time_t LAST = 0;
@@ -473,7 +467,7 @@ bool InspIRCd::IsChannel(const char *chname)
void InspIRCd::OpenLog(char** argv, int argc)
{
- if (!*LOG_FILE)
+ if (!*this->LogFileName)
{
if (Config->logpath == "")
{
@@ -482,7 +476,7 @@ void InspIRCd::OpenLog(char** argv, int argc)
}
else
{
- Config->log_file = fopen(LOG_FILE,"a+");
+ Config->log_file = fopen(this->LogFileName,"a+");
if (!Config->log_file)
{
@@ -526,7 +520,7 @@ void InspIRCd::LoadAllModules()
{
char configToken[MAXBUF];
Config->module_names.clear();
- MODCOUNT = -1;
+ this->ModCount = -1;
for (int count = 0; count < Config->ConfValueEnum(Config->config_data, "module"); count++)
{
@@ -540,6 +534,7 @@ void InspIRCd::LoadAllModules()
Exit(ERROR);
}
}
- log(DEFAULT,"Total loaded modules: %lu",(unsigned long)MODCOUNT+1);
+ printf("\nA total of \033[1;32m%d\033[0m module%s been loaded.\n", this->ModCount+1, this->ModCount+1 == 1 ? " has" : "s have");
+ log(DEFAULT,"Total loaded modules: %d", this->ModCount+1);
}