summaryrefslogtreecommitdiff
path: root/src/modules/m_conn_umodes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_conn_umodes.cpp')
-rw-r--r--src/modules/m_conn_umodes.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/m_conn_umodes.cpp b/src/modules/m_conn_umodes.cpp
index e7ff2c584..42c0ec660 100644
--- a/src/modules/m_conn_umodes.cpp
+++ b/src/modules/m_conn_umodes.cpp
@@ -54,6 +54,11 @@ class ModuleModesOnConnect : public Module
if (!IS_LOCAL(user))
return;
+ // Backup and zero out the disabled usermodes, so that we can override them here.
+ char save[64];
+ memcpy(save, ServerInstance->Config->DisabledUModes, 64);
+ memset(ServerInstance->Config->DisabledUModes, 0, 64);
+
for (int j = 0; j < Conf->Enumerate("connect"); j++)
{
std::string hostn = Conf->ReadValue("connect","allow",j);
@@ -90,6 +95,8 @@ class ModuleModesOnConnect : public Module
break;
}
}
+
+ memcpy(ServerInstance->Config->DisabledUModes, save, 64);
}
};