From 7b0f3072986ae8e6d356afd18e17e90deeb204bd Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Tue, 17 Jun 2014 13:48:50 +0200 Subject: m_spanningtree Share server description updates via SINFO desc --- src/modules/m_spanningtree/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/modules/m_spanningtree/main.cpp') diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 644193679..9a924fea9 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -649,6 +649,16 @@ void ModuleSpanningTree::OnPreRehash(User* user, const std::string ¶meter) void ModuleSpanningTree::ReadConfig(ConfigStatus& status) { + // Did this rehash change the description of this server? + const std::string& newdesc = ServerInstance->Config->ServerDesc; + if (newdesc != Utils->TreeRoot->GetDesc()) + { + // Broadcast a SINFO desc message to let the network know about the new description. This is the description + // string that is sent in the SERVER message initially and shown for example in WHOIS. + // We don't need to update the field itself in the Server object - the core does that. + CommandSInfo::Builder(Utils->TreeRoot, "desc", newdesc).Broadcast(); + } + // Re-read config stuff try { -- cgit v1.3.1-10-gc9f91