aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-06-29 22:29:34 +0100
committerGravatar Sadie Powell2023-06-29 22:52:07 +0100
commit1d96baaf774eacd5eacd357500a01af693aad654 (patch)
tree8c2e960bba6dc28f9c381c27a9c38524fda56946 /src/modules
parentFix remote users on legacy servers not having a real username. (diff)
Remove OnPreChange{Host,RealName} events and deboolify methods.
These have not ever been used as far as I can see.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_chghost.cpp3
-rw-r--r--src/modules/m_sethost.cpp10
-rw-r--r--src/modules/m_setname.cpp7
3 files changed, 6 insertions, 14 deletions
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]);