diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-03-13 04:18:25 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-03-13 04:18:25 +0000 |
commit | b822830c5bd9fff5aecf4e8f876ade39a9c7ab6c (patch) | |
tree | 281094f7c4408b2a2c7f44259fd414b5f8065227 /src/modules/m_lockserv.cpp | |
parent | e9808ffb01876ab0ebad383de7861899a17f1a63 (diff) |
Change lockserv emergency unlock procedure, and add one for jumpserver [jackmcbarn]
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12630 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_lockserv.cpp')
-rw-r--r-- | src/modules/m_lockserv.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/modules/m_lockserv.cpp b/src/modules/m_lockserv.cpp index 6e92cfd40..7f1ae0bd5 100644 --- a/src/modules/m_lockserv.cpp +++ b/src/modules/m_lockserv.cpp @@ -68,15 +68,10 @@ private: CommandLockserv lockcommand; CommandUnlockserv unlockcommand; - virtual void ResetLocked() - { - locked = false; - } - public: ModuleLockserv() : lockcommand(this, locked), unlockcommand(this, locked) { - ResetLocked(); + locked = false; ServerInstance->AddCommand(&lockcommand); ServerInstance->AddCommand(&unlockcommand); Implementation eventlist[] = { I_OnUserRegister, I_OnRehash, I_OnCheckReady }; @@ -90,7 +85,8 @@ public: virtual void OnRehash(User* user) { - ResetLocked(); + // Emergency way to unlock + if (!user) locked = false; } virtual ModResult OnUserRegister(LocalUser* user) @@ -110,7 +106,7 @@ public: virtual Version GetVersion() { - return Version("Allows locking of the server to stop all incoming connections till unlocked again", VF_VENDOR); + return Version("Allows locking of the server to stop all incoming connections until unlocked again", VF_VENDOR); } }; |