summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_spanningtree/main.cpp8
-rw-r--r--src/modules/m_spanningtree/main.h2
-rw-r--r--src/users.cpp3
3 files changed, 6 insertions, 7 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 86d511a2a..e714c9c13 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -49,7 +49,7 @@ ModuleSpanningTree::ModuleSpanningTree(InspIRCd* Me)
{
I_OnPreCommand, I_OnGetServerDescription, I_OnUserInvite, I_OnPostLocalTopicChange,
I_OnWallops, I_OnUserNotice, I_OnUserMessage, I_OnBackgroundTimer,
- I_OnUserJoin, I_OnChangeHost, I_OnChangeName, I_OnUserPart,
+ I_OnUserJoin, I_OnChangeLocalUserHost, I_OnChangeName, I_OnUserPart,
I_OnUserQuit, I_OnUserPostNick, I_OnUserKick, I_OnRemoteKill, I_OnRehash,
I_OnOper, I_OnAddLine, I_OnDelLine, I_ProtoSendMode, I_OnMode,
I_OnStats, I_ProtoSendMetaData, I_OnEvent, I_OnSetAway, I_OnPostCommand
@@ -617,14 +617,12 @@ void ModuleSpanningTree::OnUserJoin(User* user, Channel* channel, bool sync, boo
}
}
-void ModuleSpanningTree::OnChangeHost(User* user, const std::string &newhost)
+int ModuleSpanningTree::OnChangeLocalUserHost(User* user, const std::string &newhost)
{
- // only occurs for local clients
- if (user->registered != REG_ALL)
- return;
std::deque<std::string> params;
params.push_back(newhost);
Utils->DoOneToMany(user->uuid,"FHOST",params);
+ return 0;
}
void ModuleSpanningTree::OnChangeName(User* user, const std::string &gecos)
diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h
index 8cfcaaa02..363dfdef2 100644
--- a/src/modules/m_spanningtree/main.h
+++ b/src/modules/m_spanningtree/main.h
@@ -162,7 +162,7 @@ class ModuleSpanningTree : public Module
virtual void OnUserMessage(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list);
virtual void OnBackgroundTimer(time_t curtime);
virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent);
- virtual void OnChangeHost(User* user, const std::string &newhost);
+ virtual int OnChangeLocalUserHost(User* user, const std::string &newhost);
virtual void OnChangeName(User* user, const std::string &gecos);
virtual void OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent);
virtual void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message);
diff --git a/src/users.cpp b/src/users.cpp
index 784783086..bb427523a 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1672,9 +1672,10 @@ bool User::ChangeDisplayedHost(const char* shost)
FOREACH_RESULT(I_OnChangeLocalUserHost,OnChangeLocalUserHost(this,shost));
if (MOD_RESULT)
return false;
- FOREACH_MOD(I_OnChangeHost,OnChangeHost(this,shost));
}
+ FOREACH_MOD(I_OnChangeHost, OnChangeHost(this,shost));
+
int MOD_RESULT = 0;
FOREACH_RESULT(I_OnHostCycle, OnHostCycle(this));