aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/main.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-10-29 13:30:39 +0100
committerGravatar Sadie Powell2022-10-29 13:43:11 +0100
commit5a508c19ff3dec65bb4148883d38127d7c0be79e (patch)
tree2bdfcbadfdfbe0a6fd244260a9570be86a3eb8d4 /src/modules/m_spanningtree/main.cpp
parentAllow UserManager::Find{Nick,UUID,} to ignore unregistered users. (diff)
Use User::IsFullyConnected instead of checking for REG_ALL.
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
-rw-r--r--src/modules/m_spanningtree/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 241c498f5..efcac01c7 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -550,7 +550,7 @@ void ModuleSpanningTree::OnUserJoin(Membership* memb, bool sync, bool created_by
void ModuleSpanningTree::OnChangeHost(User* user, const std::string& newhost)
{
- if (user->registered != REG_ALL || !IS_LOCAL(user))
+ if (!user->IsFullyConnected() || !IS_LOCAL(user))
return;
CmdBuilder(user, "FHOST").push(newhost).Broadcast();
@@ -558,7 +558,7 @@ void ModuleSpanningTree::OnChangeHost(User* user, const std::string& newhost)
void ModuleSpanningTree::OnChangeRealHost(User* user, const std::string& newhost)
{
- if (user->registered != REG_ALL || !IS_LOCAL(user))
+ if (!user->IsFullyConnected() || !IS_LOCAL(user))
return;
CmdBuilder(user, "FRHOST").push(newhost).Broadcast();
@@ -566,7 +566,7 @@ void ModuleSpanningTree::OnChangeRealHost(User* user, const std::string& newhost
void ModuleSpanningTree::OnChangeRealName(User* user, const std::string& real)
{
- if (user->registered != REG_ALL || !IS_LOCAL(user))
+ if (!user->IsFullyConnected() || !IS_LOCAL(user))
return;
CmdBuilder(user, "FNAME").push_last(real).Broadcast();
@@ -574,7 +574,7 @@ void ModuleSpanningTree::OnChangeRealName(User* user, const std::string& real)
void ModuleSpanningTree::OnChangeIdent(User* user, const std::string& ident)
{
- if ((user->registered != REG_ALL) || (!IS_LOCAL(user)))
+ if (!user->IsFullyConnected() || !IS_LOCAL(user))
return;
CmdBuilder(user, "FIDENT").push(ident).Broadcast();
@@ -774,7 +774,7 @@ restart:
void ModuleSpanningTree::OnOper(User* user)
{
- if (user->registered != REG_ALL || !IS_LOCAL(user))
+ if (!user->IsFullyConnected() || !IS_LOCAL(user))
return;
// Note: The protocol does not allow direct umode +o;
@@ -825,7 +825,7 @@ void ModuleSpanningTree::OnMode(User* source, User* u, Channel* c, const Modes::
if (u)
{
- if (u->registered != REG_ALL)
+ if (!u->IsFullyConnected())
return;
CmdBuilder params(source, "MODE");