diff options
Diffstat (limited to 'src/logger.cpp')
-rw-r--r-- | src/logger.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/logger.cpp b/src/logger.cpp index e094f8da5..02b94f49c 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -148,8 +148,7 @@ Anope::string Log::BuildPrefix() const if (!this->c && !(this->u || this->nc)) break; buffer += "ADMIN: "; - size_t sl = this->c->name.find('/'); - Anope::string cname = sl != Anope::string::npos ? this->c->name.substr(sl + 1) : this->c->name; + Anope::string cname = source != NULL ? source->command : this->c->name; if (this->u) buffer += this->u->GetMask() + " used " + cname + " "; else if (this->nc) @@ -163,8 +162,7 @@ Anope::string Log::BuildPrefix() const if (!this->c && !(this->u || this->nc)) break; buffer += "OVERRIDE: "; - size_t sl = this->c->name.find('/'); - Anope::string cname = sl != Anope::string::npos ? this->c->name.substr(sl + 1) : this->c->name; + Anope::string cname = source != NULL ? source->command : this->c->name; if (this->u) buffer += this->u->GetMask() + " used " + cname + " "; else if (this->nc) @@ -178,8 +176,7 @@ Anope::string Log::BuildPrefix() const if (!this->c) break; buffer += "COMMAND: "; - size_t sl = this->c->name.find('/'); - Anope::string cname = sl != Anope::string::npos ? this->c->name.substr(sl + 1) : this->c->name; + Anope::string cname = source != NULL ? source->command : this->c->name; if (this->u) buffer += this->u->GetMask() + " used " + cname + " "; else if (this->source) |