From 1263f3cf63a1caff2cd8edbee9386bb6f170941f Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 5 Jul 2024 17:47:19 +0100 Subject: Fix MOTD parsing accidentally skipping lines which are blank. --- src/coremods/core_info/core_info.cpp | 2 +- src/modules/m_opermotd.cpp | 2 +- src/modules/m_showfile.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/coremods/core_info/core_info.cpp b/src/coremods/core_info/core_info.cpp index 39eddb9ab..8b41e79e6 100644 --- a/src/coremods/core_info/core_info.cpp +++ b/src/coremods/core_info/core_info.cpp @@ -147,7 +147,7 @@ public: // Process the MOTD entry. auto& newmotd = newmotds[motd]; - irc::sepstream linestream(file.contents, '\n'); + irc::sepstream linestream(file.contents, '\n', true); for (std::string line; linestream.GetToken(line); ) { // Some clients can not handle receiving RPL_MOTD with an empty diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp index a501d442c..4ddd9bac7 100644 --- a/src/modules/m_opermotd.cpp +++ b/src/modules/m_opermotd.cpp @@ -112,7 +112,7 @@ private: // Process the MOTD entry. auto& newmotd = newmotds[motd]; - irc::sepstream linestream(file.contents, '\n'); + irc::sepstream linestream(file.contents, '\n', true); for (std::string line; linestream.GetToken(line); ) { // Some clients can not handle receiving RPL_OMOTD with an empty diff --git a/src/modules/m_showfile.cpp b/src/modules/m_showfile.cpp index ea6ea0730..b12c3f60b 100644 --- a/src/modules/m_showfile.cpp +++ b/src/modules/m_showfile.cpp @@ -97,7 +97,7 @@ public: // Process the entry. contents.clear(); - irc::sepstream linestream(filecontents, '\n'); + irc::sepstream linestream(filecontents, '\n', true); for (std::string line; linestream.GetToken(line); ) { // Some clients can not handle receiving NOTICE/PRIVMSG/RPL_RULES -- cgit v1.3.1-10-gc9f91