From 823f0ab7aabad8e378a59998ca9f42956db44b78 Mon Sep 17 00:00:00 2001 From: peavey Date: Sun, 10 Aug 2008 16:45:46 +0000 Subject: Fix checks on GetExt everywhere its used. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10135 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_swhois.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/modules/m_swhois.cpp') diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index 0d9adeb4d..196b556dc 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -39,9 +39,7 @@ class CommandSwhois : public Command } std::string* text; - dest->GetExt("swhois", text); - - if (text) + if (dest->GetExt("swhois", text)) { // We already had it set... if (!ServerInstance->ULine(user->server)) @@ -134,8 +132,7 @@ class ModuleSWhois : public Module { // check if this user has an swhois field to send std::string* swhois; - user->GetExt("swhois", swhois); - if (swhois) + if (user->GetExt("swhois", swhois)) { // call this function in the linking module, let it format the data how it // sees fit, and send it on its way. We dont need or want to know how. @@ -148,8 +145,7 @@ class ModuleSWhois : public Module virtual void OnUserQuit(User* user, const std::string &message, const std::string &oper_message) { std::string* swhois; - user->GetExt("swhois", swhois); - if (swhois) + if (user->GetExt("swhois", swhois)) { user->Shrink("swhois"); delete swhois; @@ -163,8 +159,7 @@ class ModuleSWhois : public Module { User* user = (User*)item; std::string* swhois; - user->GetExt("swhois", swhois); - if (swhois) + if (user->GetExt("swhois", swhois)) { user->Shrink("swhois"); delete swhois; -- cgit v1.2.3