diff options
| author | 2022-10-23 15:01:35 +0100 | |
|---|---|---|
| committer | 2022-10-23 15:01:35 +0100 | |
| commit | bcf484016b17354c21e664901394bfc8dc79ea53 (patch) | |
| tree | 8cd6620ac0e074d197fc92ee57026274aaeb5466 /src/modules/m_permchannels.cpp | |
| parent | Update the Windows dependencies. (diff) | |
Only store the topic in the permchannels database if one is set.
Diffstat (limited to 'src/modules/m_permchannels.cpp')
| -rw-r--r-- | src/modules/m_permchannels.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index bec10de0b..fdfbfecc4 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -142,11 +142,15 @@ static bool WriteDatabase(PermChannel& permchanmode, Module* mod, bool save_list } stream << "<permchannels channel=\"" << ServerConfig::Escape(chan->name) - << "\" ts=\"" << chan->age - << "\" topic=\"" << ServerConfig::Escape(chan->topic) - << "\" topicts=\"" << chan->topicset - << "\" topicsetby=\"" << ServerConfig::Escape(chan->setby) - << "\" modes=\"" << ServerConfig::Escape(chanmodes) + << "\" ts=\"" << chan->age; + if (!chan->topic.empty()) + { + // Only store the topic if one is set. + stream << "\" topic=\"" << ServerConfig::Escape(chan->topic) + << "\" topicts=\"" << chan->topicset + << "\" topicsetby=\"" << ServerConfig::Escape(chan->setby); + } + stream << "\" modes=\"" << ServerConfig::Escape(chanmodes) << "\">" << std::endl; } |
