* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2010 InspIRCd Development Team
* See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
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 };
virtual void OnRehash(User* user)
{
- ResetLocked();
+ // Emergency way to unlock
+ if (!user) locked = false;
}
virtual ModResult OnUserRegister(LocalUser* user)
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);
}
};