summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-09-03 18:51:18 -0400
committerAdam <Adam@anope.org>2013-09-03 18:51:18 -0400
commit46913511677b169f32d55e4fc96a8c236169ddc7 (patch)
tree170400c6eabe8e18d0a4809f89a46ff239dfc156 /src
parent404debf78925f86e94cfd71334433bc1eb423115 (diff)
Cleanup previous commit
Fix log messages from commands send through webpanel Don't show OperServ section to non opers
Diffstat (limited to 'src')
-rw-r--r--src/logger.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/logger.cpp b/src/logger.cpp
index 02b94f49c..296b22dac 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -148,7 +148,7 @@ Anope::string Log::BuildPrefix() const
if (!this->c && !(this->u || this->nc))
break;
buffer += "ADMIN: ";
- Anope::string cname = source != NULL ? source->command : this->c->name;
+ Anope::string cname = source != NULL && !source->command.empty() ? source->command : this->c->name;
if (this->u)
buffer += this->u->GetMask() + " used " + cname + " ";
else if (this->nc)
@@ -162,7 +162,7 @@ Anope::string Log::BuildPrefix() const
if (!this->c && !(this->u || this->nc))
break;
buffer += "OVERRIDE: ";
- Anope::string cname = source != NULL ? source->command : this->c->name;
+ Anope::string cname = source != NULL && !source->command.empty() ? source->command : this->c->name;
if (this->u)
buffer += this->u->GetMask() + " used " + cname + " ";
else if (this->nc)
@@ -176,7 +176,7 @@ Anope::string Log::BuildPrefix() const
if (!this->c)
break;
buffer += "COMMAND: ";
- Anope::string cname = source != NULL ? source->command : this->c->name;
+ Anope::string cname = source != NULL && !source->command.empty() ? source->command : this->c->name;
if (this->u)
buffer += this->u->GetMask() + " used " + cname + " ";
else if (this->source)