summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
-rw-r--r--src/modules/m_spanningtree/main.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 1067852d1..f639a748d 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -765,7 +765,21 @@ void ModuleSpanningTree::OnPreRehash(User* user, const std::string &parameter)
void ModuleSpanningTree::OnRehash(User* user)
{
// Re-read config stuff
- Utils->ReadConfiguration();
+ try
+ {
+ Utils->ReadConfiguration();
+ }
+ catch (ModuleException& e)
+ {
+ // Refresh the IP cache anyway, so servers read before the error will be allowed to connect
+ Utils->RefreshIPCache();
+ // Always warn local opers with snomask +l, also warn globally (snomask +L) if the rehash was issued by a remote user
+ std::string msg = "Error in configuration: ";
+ msg.append(e.GetReason());
+ ServerInstance->SNO->WriteToSnoMask('l', msg);
+ if (!IS_LOCAL(user))
+ ServerInstance->PI->SendSNONotice("L", msg);
+ }
}
void ModuleSpanningTree::OnLoadModule(Module* mod)