diff options
author | aquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-07-18 15:29:58 +0000 |
---|---|---|
committer | aquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-07-18 15:29:58 +0000 |
commit | 58ecf39129ae6d1e5a15785c7bb8bf0fd5ee46b9 (patch) | |
tree | edfb4ec7ebd0e0cb28a685c5217d430d25478995 /src/modules | |
parent | 21bb2f2acf59f1bdf2853908fe82601531068a21 (diff) |
Implement <disabled:usermodes> and <disabled:chanmodes>.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10032 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_conn_umodes.cpp | 7 |
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); } }; |