From 6e7d449495fccb053f3cea8009b7c7c9b38a0a82 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Mon, 31 Jan 2022 02:33:06 +0000 Subject: Refuse to set an extension on the wrong type of extensible. --- src/modules/m_monitor.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/modules/m_monitor.cpp') diff --git a/src/modules/m_monitor.cpp b/src/modules/m_monitor.cpp index 19f2b66a6..ae1961479 100644 --- a/src/modules/m_monitor.cpp +++ b/src/modules/m_monitor.cpp @@ -245,6 +245,9 @@ private: void IRCv3::Monitor::Manager::ExtItem::FromInternal(Extensible* container, const std::string& value) noexcept { + if (container->extype != this->extype) + return; + irc::spacesepstream ss(value); for (std::string nick; ss.GetToken(nick); ) manager.Watch(static_cast(container), nick, UINT_MAX); -- cgit v1.3.1-10-gc9f91