diff options
author | Adam <Adam@anope.org> | 2011-09-19 12:14:02 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-09-19 12:14:02 -0400 |
commit | 934723faa5f7be2f9bf7e7aff0c329bf87a2c987 (patch) | |
tree | e0d5dbccc6d92ddf1fc774d263fc17c5c10ec800 /src/logger.cpp | |
parent | f07295cc78b6132c0803ad7c459ca3a7eb962e94 (diff) |
LOG_COMMAND must now always give a valid command
Diffstat (limited to 'src/logger.cpp')
-rw-r--r-- | src/logger.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/logger.cpp b/src/logger.cpp index d21a63e5a..648a0da5f 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -164,6 +164,8 @@ Anope::string Log::BuildPrefix() const { case LOG_ADMIN: { + if (!this->c) + 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; @@ -174,6 +176,8 @@ Anope::string Log::BuildPrefix() const } case LOG_OVERRIDE: { + if (!this->c) + 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; @@ -184,6 +188,8 @@ Anope::string Log::BuildPrefix() const } case LOG_COMMAND: { + 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; |