diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_conn_umodes.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/m_conn_umodes.cpp b/src/modules/m_conn_umodes.cpp index 0b708641e..acac7640a 100644 --- a/src/modules/m_conn_umodes.cpp +++ b/src/modules/m_conn_umodes.cpp @@ -39,10 +39,8 @@ class ModuleModesOnConnect : public Module void OnUserConnect(LocalUser* user) CXX11_OVERRIDE { // Backup and zero out the disabled usermodes, so that we can override them here. - char save[64]; - memcpy(save, ServerInstance->Config->DisabledUModes, - sizeof(ServerInstance->Config->DisabledUModes)); - memset(ServerInstance->Config->DisabledUModes, 0, 64); + const std::bitset<64> save = ServerInstance->Config->DisabledUModes; + ServerInstance->Config->DisabledUModes.reset(); ConfigTag* tag = user->MyClass->config; std::string ThisModes = tag->getString("modes"); @@ -61,7 +59,7 @@ class ModuleModesOnConnect : public Module ServerInstance->Parser.CallHandler("MODE", modes, user); } - memcpy(ServerInstance->Config->DisabledUModes, save, 64); + ServerInstance->Config->DisabledUModes = save; } }; |