From 275f2fd374a75896b356297c1d9de8b13a894d1c Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 19 Dec 2013 08:19:35 -0500 Subject: [PATCH] Fix db_old assigning empty greets to users who did not have a greet. Fix debug log message in extensible.cpp --- modules/database/db_old.cpp | 3 ++- src/extensible.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp index c017eb681..a6627bb8b 100644 --- a/modules/database/db_old.cpp +++ b/modules/database/db_old.cpp @@ -450,7 +450,8 @@ static void LoadNicks() nc->email = buffer; READ(read_string(buffer, f)); - nc->Extend("greet", buffer); + if (!buffer.empty()) + nc->Extend("greet", buffer); uint32_t u32; READ(read_uint32(&u32, f)); diff --git a/src/extensible.cpp b/src/extensible.cpp index d977e0b3c..50b280c56 100644 --- a/src/extensible.cpp +++ b/src/extensible.cpp @@ -66,7 +66,7 @@ bool* Extensible::Extend(const Anope::string &name, const bool &what) if (ref) return ref->Set(this); - Log(LOG_DEBUG) << "Shrink for nonexistant type " << name << " on " << static_cast(this); + Log(LOG_DEBUG) << "Extend for nonexistant type " << name << " on " << static_cast(this); return NULL; }