diff options
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 14 | ||||
-rw-r--r-- | src/modules/m_spanningtree/main.h | 4 |
2 files changed, 8 insertions, 10 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 3b18874d3..a0acd9b08 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -46,7 +46,7 @@ ModuleSpanningTree::ModuleSpanningTree() { I_OnPreCommand, I_OnGetServerDescription, I_OnUserInvite, I_OnPostTopicChange, I_OnWallops, I_OnUserNotice, I_OnUserMessage, I_OnBackgroundTimer, I_OnUserJoin, - I_OnChangeLocalUserHost, I_OnChangeName, I_OnChangeIdent, I_OnUserPart, I_OnUnloadModule, + I_OnChangeHost, I_OnChangeName, I_OnChangeIdent, I_OnUserPart, I_OnUnloadModule, I_OnUserQuit, I_OnUserPostNick, I_OnUserKick, I_OnRemoteKill, I_OnRehash, I_OnPreRehash, I_OnOper, I_OnAddLine, I_OnDelLine, I_OnMode, I_OnLoadModule, I_OnStats, I_OnSetAway, I_OnPostCommand, I_OnUserConnect @@ -592,7 +592,7 @@ void ModuleSpanningTree::OnBackgroundTimer(time_t curtime) DoConnectTimeout(curtime); } -void ModuleSpanningTree::OnUserConnect(User* user) +void ModuleSpanningTree::OnUserConnect(LocalUser* user) { if (user->quitting) return; @@ -630,21 +630,19 @@ void ModuleSpanningTree::OnUserJoin(Membership* memb, bool sync, bool created, C } } -ModResult ModuleSpanningTree::OnChangeLocalUserHost(User* user, const std::string &newhost) +void ModuleSpanningTree::OnChangeHost(User* user, const std::string &newhost) { - if (user->registered != REG_ALL) - return MOD_RES_PASSTHRU; + if (user->registered != REG_ALL || !IS_LOCAL(user)) + return; parameterlist params; params.push_back(newhost); Utils->DoOneToMany(user->uuid,"FHOST",params); - return MOD_RES_PASSTHRU; } void ModuleSpanningTree::OnChangeName(User* user, const std::string &gecos) { - // only occurs for local clients - if (user->registered != REG_ALL) + if (user->registered != REG_ALL || !IS_LOCAL(user)) return; parameterlist params; diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h index 692442598..b9d5debb3 100644 --- a/src/modules/m_spanningtree/main.h +++ b/src/modules/m_spanningtree/main.h @@ -161,7 +161,7 @@ class ModuleSpanningTree : public Module ModResult OnPreCommand(std::string &command, std::vector<std::string>& parameters, User *user, bool validated, const std::string &original_line); void OnPostCommand(const std::string &command, const std::vector<std::string>& parameters, User *user, CmdResult result, const std::string &original_line); void OnGetServerDescription(const std::string &servername,std::string &description); - void OnUserConnect(User* source); + void OnUserConnect(LocalUser* source); void OnUserInvite(User* source,User* dest,Channel* channel, time_t); void OnPostTopicChange(User* user, Channel* chan, const std::string &topic); void OnWallops(User* user, const std::string &text); @@ -169,7 +169,7 @@ class ModuleSpanningTree : public Module void OnUserMessage(User* user, void* dest, int target_type, const std::string &text, char status, const CUList &exempt_list); void OnBackgroundTimer(time_t curtime); void OnUserJoin(Membership* memb, bool sync, bool created, CUList& excepts); - ModResult OnChangeLocalUserHost(User* user, const std::string &newhost); + void OnChangeHost(User* user, const std::string &newhost); void OnChangeName(User* user, const std::string &gecos); void OnChangeIdent(User* user, const std::string &ident); void OnUserPart(Membership* memb, std::string &partmessage, CUList& excepts); |