summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/main.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-05-24 02:53:45 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-05-24 02:53:45 +0000
commit0da6b3a13def40e8fd002b9fc60f955467f6372d (patch)
treed4aa39ece30255afe7447fb46f39c45c39d679a3 /src/modules/m_spanningtree/main.cpp
parent5f309503fa985faa5b255246fc0415455c1c65ee (diff)
OnRehash changes: split to multiple hooks to clarify use and prevent explosion of rehashes on a /REHASH *
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11388 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
-rw-r--r--src/modules/m_spanningtree/main.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 37ed06c3a..45aea56ec 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -50,11 +50,11 @@ ModuleSpanningTree::ModuleSpanningTree(InspIRCd* Me)
I_OnPreCommand, I_OnGetServerDescription, I_OnUserInvite, I_OnPostLocalTopicChange,
I_OnWallops, I_OnUserNotice, I_OnUserMessage, I_OnBackgroundTimer,
I_OnUserJoin, I_OnChangeLocalUserHost, I_OnChangeName, I_OnUserPart, I_OnUnloadModule,
- I_OnUserQuit, I_OnUserPostNick, I_OnUserKick, I_OnRemoteKill, I_OnRehash,
+ I_OnUserQuit, I_OnUserPostNick, I_OnUserKick, I_OnRemoteKill, I_OnRehash, I_OnPreRehash,
I_OnOper, I_OnAddLine, I_OnDelLine, I_ProtoSendMode, I_OnMode, I_OnLoadModule,
I_OnStats, I_ProtoSendMetaData, I_OnEvent, I_OnSetAway, I_OnPostCommand
};
- ServerInstance->Modules->Attach(eventlist, this, 29);
+ ServerInstance->Modules->Attach(eventlist, this, 30);
delete ServerInstance->PI;
ServerInstance->PI = new SpanningTreeProtocolInterface(this, Utils, ServerInstance);
@@ -706,19 +706,21 @@ void ModuleSpanningTree::OnRemoteKill(User* source, User* dest, const std::strin
Utils->DoOneToMany(source->uuid,"KILL",params);
}
-void ModuleSpanningTree::OnRehash(User* user, const std::string &parameter)
+void ModuleSpanningTree::OnPreRehash(User* user, const std::string &parameter)
{
ServerInstance->Logs->Log("remoterehash", DEBUG, "called with param %s", parameter.c_str());
// Send out to other servers
if (!parameter.empty() && parameter[0] != '-')
{
- ServerInstance->Logs->Log("remoterehash", DEBUG, "sending out lol");
std::deque<std::string> params;
params.push_back(parameter);
Utils->DoOneToAllButSender(user ? user->uuid : ServerInstance->Config->GetSID(), "REHASH", params, user ? user->server : ServerInstance->Config->ServerName);
}
+}
+void ModuleSpanningTree::OnRehash(User* user)
+{
// Re-read config stuff
Utils->ReadConfiguration(true);
}