diff options
| author | 2014-06-17 13:48:50 +0200 | |
|---|---|---|
| committer | 2014-06-17 13:48:50 +0200 | |
| commit | 7b0f3072986ae8e6d356afd18e17e90deeb204bd (patch) | |
| tree | e59c6a54abc3fe1402a51416a807f9420cd2247d /src/modules/m_spanningtree/main.cpp | |
| parent | Update the description field in the Server object representing the local serv... (diff) | |
m_spanningtree Share server description updates via SINFO desc
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/main.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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 { |
