summaryrefslogtreecommitdiff
path: root/src/logger.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-09-01 18:54:51 -0400
committerAdam <Adam@anope.org>2012-09-01 18:54:51 -0400
commite3d5140dcc936ff411c438b7e3997104cb5f085a (patch)
tree49d7ee0b3e531a1c81e35fb10f25e6340fa781ba /src/logger.cpp
parentf81d0113a21187d68c5fa0f1262e5514465b1953 (diff)
Added a web panel module + a default template
Diffstat (limited to 'src/logger.cpp')
-rw-r--r--src/logger.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/logger.cpp b/src/logger.cpp
index d18b0731e..0624509d2 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -83,7 +83,7 @@ Log::Log(LogType type, const Anope::string &category, const BotInfo *b) : bi(b),
this->Sources.push_back(bi->nick);
}
-Log::Log(LogType type, const CommandSource &source, Command *_c, const ChannelInfo *_ci) : u(source.GetUser()), nc(source.nc), c(_c), chan(NULL), ci(_ci), s(NULL), Type(type)
+Log::Log(LogType type, const CommandSource &source, Command *_c, const ChannelInfo *_ci) : nick(source.GetNick()), u(source.GetUser()), nc(source.nc), c(_c), chan(NULL), ci(_ci), s(NULL), Type(type)
{
if (!c)
throw CoreException("Invalid pointers passed to Log::Log");
@@ -210,7 +210,7 @@ Anope::string Log::BuildPrefix() const
}
case LOG_COMMAND:
{
- if (!this->c || !(this->u || this->nc))
+ if (!this->c)
break;
buffer += "COMMAND: ";
size_t sl = this->c->name.find('/');
@@ -219,6 +219,8 @@ Anope::string Log::BuildPrefix() const
buffer += this->u->GetMask() + " used " + cname + " ";
else if (this->nc)
buffer += this->nc->display + " used " + cname + " ";
+ else
+ buffer += this->nick + " used " + cname + " ";
if (this->ci)
buffer += "on " + this->ci->name + " ";
break;