diff options
Diffstat (limited to 'src/modules/m_swhois.cpp')
-rw-r--r-- | src/modules/m_swhois.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index a8142030d..000eeb040 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -187,16 +187,19 @@ class ModuleSWhois : public Module { std::string swhois = Conf->ReadValue("type", "swhois", i); - if(std::string* old = (std::string*)user->GetExt("swhois")) + if(swhois.length()) { - user->Shrink("swhois"); - delete old; - } + if(std::string* old = (std::string*)user->GetExt("swhois")) + { + user->Shrink("swhois"); + delete old; + } - std::string* text = new std::string(swhois); - user->Extend("swhois", (char*)text); - - break; + std::string* text = new std::string(swhois); + user->Extend("swhois", (char*)text); + + break; + } } } } |