From cc9e2c126035c1fb828f8ab740ee93a562f0ec07 Mon Sep 17 00:00:00 2001 From: PeGaSuS Date: Fri, 24 Nov 2023 17:56:06 +0100 Subject: [PATCH 1/2] Fix missing end of comment --- data/modules.example.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/data/modules.example.conf b/data/modules.example.conf index eba8f777f..b8ae09357 100644 --- a/data/modules.example.conf +++ b/data/modules.example.conf @@ -413,6 +413,7 @@ module { name = "help" } * * Provides the regex engine regex/pcre, which uses version 2 of the Perl Compatible Regular * Expressions library. This can not be loaded at the same time as the m_regex_pcre module. + */ #module { name = "m_regex_pcre2" } /* From 8e2fa4acdbc24d0a629b737d5dd42a31a543016d Mon Sep 17 00:00:00 2001 From: Mingjie Shen Date: Wed, 6 Dec 2023 18:18:56 -0500 Subject: [PATCH 2/2] messages: fix incorrect format specifier Calling a printf-like function with the wrong type of arguments causes unpredictable behavior. Signed-off-by: Mingjie Shen --- src/messages.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/messages.cpp b/src/messages.cpp index 84124f5e8..5842b1eeb 100644 --- a/src/messages.cpp +++ b/src/messages.cpp @@ -442,8 +442,8 @@ void Stats::Run(MessageSource &source, const std::vector ¶ms) case 'u': { long uptime = static_cast(Anope::CurTime - Anope::StartTime); - IRCD->SendNumeric(242, source.GetSource(), ":Services up %d day%s, %02d:%02d:%02d", uptime / 86400, uptime / 86400 == 1 ? "" : "s", (uptime / 3600) % 24, (uptime / 60) % 60, uptime % 60); - IRCD->SendNumeric(250, source.GetSource(), ":Current users: %d (%d ops); maximum %d", UserListByNick.size(), OperCount, MaxUserCount); + IRCD->SendNumeric(242, source.GetSource(), ":Services up %ld day%s, %02ld:%02ld:%02ld", uptime / 86400, uptime / 86400 == 1 ? "" : "s", (uptime / 3600) % 24, (uptime / 60) % 60, uptime % 60); + IRCD->SendNumeric(250, source.GetSource(), ":Current users: %lu (%d ops); maximum %u", static_cast(UserListByNick.size()), OperCount, MaxUserCount); IRCD->SendNumeric(219, source.GetSource(), "%c :End of /STATS report.", params[0][0]); break; } /* case 'u' */