aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_chghost.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-09-30 20:37:37 +0100
committerGravatar Sadie Powell2022-09-30 20:37:37 +0100
commitf765ae5dbf551fcce62d29ba3eaebde0af54e73b (patch)
treee3be16443117d55d3c6aa84e3b8b8ff09af2c78e /src/modules/m_chghost.cpp
parentPrevent allowing weird characters within hostnames. (diff)
Enforce <hostname:charmap> network-wide on the 1206 protocol.
Diffstat (limited to 'src/modules/m_chghost.cpp')
-rw-r--r--src/modules/m_chghost.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index 9aff5140b..a0d3356ff 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -111,6 +111,13 @@ public:
}
std::swap(newhostmap, cmd.hostmap);
}
+
+ void GetLinkData(Module::LinkData& data, std::string& compatdata) override
+ {
+ for (size_t i = 0; i < cmd.hostmap.size(); ++i)
+ if (cmd.hostmap[i])
+ data["hostchars"].push_back(static_cast<unsigned char>(i));
+ }
};
MODULE_INIT(ModuleChgHost)