summaryrefslogtreecommitdiff
path: root/src/logger.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-05-28 12:07:29 -0400
committerAdam <Adam@anope.org>2014-05-28 12:07:54 -0400
commitf29e1cf383529a1a29f02b0669d973f5ee0b7a66 (patch)
tree3c33db276dc9328235bbd572641521ed44458176 /src/logger.cpp
parent1253c70e0682fa1490c99c3d2869049a0e3fa2e0 (diff)
Move most of the core pseudoclient logic to modules
Diffstat (limited to 'src/logger.cpp')
-rw-r--r--src/logger.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/logger.cpp b/src/logger.cpp
index 1aa530f82..86141ed8a 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -22,6 +22,8 @@
#include "uplink.h"
#include "protocol.h"
#include "event.h"
+#include "modules/nickserv.h"
+#include "modules/chanserv.h"
#ifndef _WIN32
#include <sys/time.h>
@@ -80,11 +82,11 @@ Log::Log(LogType t, const Anope::string &cat, BotInfo *b) : bi(b), u(NULL), nc(N
{
}
-Log::Log(LogType t, CommandSource &src, Command *_c, ChannelInfo *_ci) : u(src.GetUser()), nc(src.nc), c(_c), source(&src), chan(NULL), ci(_ci), s(NULL), m(NULL), type(t)
+Log::Log(LogType t, CommandSource &src, Command *_c, ChanServ::Channel *_ci) : u(src.GetUser()), nc(src.nc), c(_c), source(&src), chan(NULL), ci(_ci), s(NULL), m(NULL), type(t)
{
if (!c)
throw CoreException("Invalid pointers passed to Log::Log");
-
+
if (type != LOG_COMMAND && type != LOG_OVERRIDE && type != LOG_ADMIN)
throw CoreException("This constructor does not support this log type");
@@ -131,7 +133,7 @@ Log::~Log()
std::cout << this->BuildPrefix() << this->buf.str() << std::endl;
Event::OnLog(&Event::Log::OnLog, this);
-
+
if (Config)
for (unsigned i = 0; i < Config->LogInfos.size(); ++i)
if (Config->LogInfos[i].HasType(this->type, this->category))
@@ -362,7 +364,7 @@ void LogInfo::ProcessMessage(const Log *l)
if (!c)
continue;
- BotInfo *bi = l->bi;
+ User *bi = l->bi;
if (!bi)
bi = this->bot;
if (!bi)
@@ -379,7 +381,7 @@ void LogInfo::ProcessMessage(const Log *l)
}
}
}
-
+
tm *tm = localtime(&Anope::CurTime);
if (tm->tm_mday != this->last_day)
{