From 896ed2b512a1c3723eae032dfb71cd6d594cb218 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 10 Oct 2024 19:29:56 +0100 Subject: [PATCH 1/2] Fix a pgsql module warning when building against recent libpq. --- src/modules/extra/m_pgsql.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 1bf17313b..70846d90e 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -37,11 +37,30 @@ /// $PackageInfo: require_system("ubuntu") libpq-dev +#ifdef __GNUC__ +# pragma GCC diagnostic push +#endif + +// Fix warnings about the use of commas at end of enumerator lists on C++03. +#if defined __clang__ +# pragma clang diagnostic ignored "-Wc++11-extensions" +#elif defined __GNUC__ +# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) +# pragma GCC diagnostic ignored "-Wpedantic" +# else +# pragma GCC diagnostic ignored "-pedantic" +# endif +#endif + #include "inspircd.h" #include #include #include "modules/sql.h" +#ifdef __GNUC__ +# pragma GCC diagnostic pop +#endif + /* SQLConn rewritten by peavey to * use EventHandler instead of * BufferedSocket. This is much neater From 18166edfeb03e1963c07e55fca0800f302de5619 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 11 Oct 2024 19:28:38 +0100 Subject: [PATCH 2/2] Fix chanlog not hiding the local server when hideserver is enabled. --- src/modules/m_chanlog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/m_chanlog.cpp b/src/modules/m_chanlog.cpp index 6cdb8d3f8..ae35ebaf7 100644 --- a/src/modules/m_chanlog.cpp +++ b/src/modules/m_chanlog.cpp @@ -74,7 +74,7 @@ class ModuleChanLog : public Module Channel *c = ServerInstance->FindChan(it->second); if (c) { - ClientProtocol::Messages::Privmsg privmsg(ClientProtocol::Messages::Privmsg::nocopy, ServerInstance->Config->ServerName, c, snotice); + ClientProtocol::Messages::Privmsg privmsg(ClientProtocol::Messages::Privmsg::nocopy, ServerInstance->FakeClient, c, snotice); c->Write(ServerInstance->GetRFCEvents().privmsg, privmsg); ServerInstance->PI->SendMessage(c, 0, snotice); }