summaryrefslogtreecommitdiff
path: root/src/modules/m_nationalchars.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_nationalchars.cpp')
-rw-r--r--src/modules/m_nationalchars.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp
index 2b7e66a50..dbeff6db9 100644
--- a/src/modules/m_nationalchars.cpp
+++ b/src/modules/m_nationalchars.cpp
@@ -222,6 +222,7 @@ class ModuleNationalChars : public Module
TR1NS::function<bool(const std::string&)> rememberer;
bool forcequit;
const unsigned char * lowermap_rememberer;
+ std::string casemapping_rememberer;
unsigned char prev_map[256];
template <typename T>
@@ -248,7 +249,9 @@ class ModuleNationalChars : public Module
public:
ModuleNationalChars()
- : rememberer(ServerInstance->IsNick), lowermap_rememberer(national_case_insensitive_map)
+ : rememberer(ServerInstance->IsNick)
+ , lowermap_rememberer(national_case_insensitive_map)
+ , casemapping_rememberer(ServerInstance->Config->CaseMapping)
{
memcpy(prev_map, national_case_insensitive_map, sizeof(prev_map));
}
@@ -305,6 +308,9 @@ class ModuleNationalChars : public Module
{
ServerInstance->IsNick = rememberer;
national_case_insensitive_map = lowermap_rememberer;
+ ServerInstance->Config->CaseMapping = casemapping_rememberer;
+ // The core rebuilds ISupport on module unload, but before the dtor.
+ ServerInstance->ISupport.Build();
CheckForceQuit("National characters module unloaded");
CheckRehash();
}