diff options
author | Peter Powell <petpow@saberuk.com> | 2018-08-24 12:24:07 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-08-24 12:30:09 +0100 |
commit | 5a30926e2b3b54e1ee3562dea6119d9237814e9f (patch) | |
tree | 1882356a50fb27f6dcf41d76abd5dd508c00d940 | |
parent | 69f70c16d0a7c0a13d067a55781604f082d569b6 (diff) |
Allow unlocking jumpserver and lockserv with a module rehash.
Closes #282.
-rw-r--r-- | src/modules/m_jumpserver.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_lockserv.cpp | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp index 9f3b41af7..682e353d2 100644 --- a/src/modules/m_jumpserver.cpp +++ b/src/modules/m_jumpserver.cpp @@ -161,6 +161,12 @@ class ModuleJumpServer : public Module { } + void OnModuleRehash(User* user, const std::string& param) CXX11_OVERRIDE + { + if (irc::equals(param, "jumpserver") && js.redirect_new_users) + js.redirect_new_users = false; + } + ModResult OnUserRegister(LocalUser* user) CXX11_OVERRIDE { if (js.redirect_new_users) diff --git a/src/modules/m_lockserv.cpp b/src/modules/m_lockserv.cpp index 45a0095d7..2db01b99a 100644 --- a/src/modules/m_lockserv.cpp +++ b/src/modules/m_lockserv.cpp @@ -100,6 +100,12 @@ class ModuleLockserv : public Module locked.clear(); } + void OnModuleRehash(User* user, const std::string& param) CXX11_OVERRIDE + { + if (irc::equals(param, "lockserv") && !locked.empty()) + locked.clear(); + } + ModResult OnUserRegister(LocalUser* user) CXX11_OVERRIDE { if (!locked.empty()) |