From 1d96baaf774eacd5eacd357500a01af693aad654 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 29 Jun 2023 22:29:34 +0100 Subject: Remove OnPreChange{Host,RealName} events and deboolify methods. These have not ever been used as far as I can see. --- src/modules/m_chghost.cpp | 3 ++- src/modules/m_sethost.cpp | 10 +++------- src/modules/m_setname.cpp | 7 +------ 3 files changed, 6 insertions(+), 14 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index 590bdb2d7..e45832dce 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -68,7 +68,8 @@ public: if (IS_LOCAL(dest)) { - if ((dest->ChangeDisplayedHost(parameters[1])) && (!user->server->IsService())) + dest->ChangeDisplayedHost(parameters[1]); + if (!user->server->IsService()) { ServerInstance->SNO.WriteGlobalSno('a', user->nick+" used CHGHOST to make the displayed host of "+dest->nick+" become "+dest->GetDisplayedHost()); } diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp index 00bd92580..c20c22e3f 100644 --- a/src/modules/m_sethost.cpp +++ b/src/modules/m_sethost.cpp @@ -55,13 +55,9 @@ public: } } - if (user->ChangeDisplayedHost(parameters[0])) - { - ServerInstance->SNO.WriteGlobalSno('a', user->nick+" used SETHOST to change their displayed host to "+user->GetDisplayedHost()); - return CmdResult::SUCCESS; - } - - return CmdResult::FAILURE; + user->ChangeDisplayedHost(parameters[0]); + ServerInstance->SNO.WriteGlobalSno('a', user->nick+" used SETHOST to change their displayed host to "+user->GetDisplayedHost()); + return CmdResult::SUCCESS; } }; diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp index 0d50b3882..455632641 100644 --- a/src/modules/m_setname.cpp +++ b/src/modules/m_setname.cpp @@ -55,12 +55,7 @@ public: return CmdResult::FAILURE; } - if (!user->ChangeRealName(parameters[0])) - { - fail.SendIfCap(user, &cap, this, "CANNOT_CHANGE_REALNAME", "Unable to change your real name"); - return CmdResult::FAILURE; - } - + user->ChangeRealName(parameters[0]); if (notifyopers) ServerInstance->SNO.WriteGlobalSno('a', "{} used SETNAME to change their real name to '{}'", user->nick, parameters[0]); -- cgit v1.3.1-10-gc9f91