diff options
-rw-r--r-- | src/modules/m_customtitle.cpp | 13 | ||||
-rw-r--r-- | src/modules/m_swhois.cpp | 13 |
2 files changed, 8 insertions, 18 deletions
diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index 769b8ec4d..0023ab6dc 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -66,9 +66,7 @@ class CommandTitle : public Command if (!strcmp(name.c_str(),parameters[0].c_str()) && !ServerInstance->PassCompare(user, pass.c_str(), parameters[1].c_str(), hash.c_str()) && OneOfMatches(TheHost,TheIP,host.c_str()) && !title.empty()) { std::string* text; - user->GetExt("ctitle", text); - - if (text) + if (user->GetExt("ctitle", text)) { user->Shrink("ctitle"); delete text; @@ -146,8 +144,7 @@ class ModuleCustomTitle : public Module { // check if this user has an ctitle field to send std::string* ctitle; - user->GetExt("ctitle", ctitle); - if (ctitle) + if (user->GetExt("ctitle", ctitle)) { // 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. @@ -160,8 +157,7 @@ class ModuleCustomTitle : public Module virtual void OnUserQuit(User* user, const std::string &message, const std::string &oper_message) { std::string* ctitle; - user->GetExt("ctitle", ctitle); - if (ctitle) + if (user->GetExt("ctitle", ctitle)) { user->Shrink("ctitle"); delete ctitle; @@ -175,8 +171,7 @@ class ModuleCustomTitle : public Module { User* user = (User*)item; std::string* ctitle; - user->GetExt("ctitle", ctitle); - if (ctitle) + if (user->GetExt("ctitle", ctitle)) { user->Shrink("ctitle"); delete ctitle; 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; |