* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
* the file COPYING for details.
{
locked = true;
user->WriteNumeric(988, "%s %s :Closed for new connections", user->nick.c_str(), user->server);
- ServerInstance->SNO->WriteToSnoMask('A', "Oper %s used LOCKSERV to temporarily close for new connections", user->nick.c_str());
+ ServerInstance->SNO->WriteGlobalSno('a', "Oper %s used LOCKSERV to temporarily close for new connections", user->nick.c_str());
/* Dont send to the network */
return CMD_LOCALONLY;
}
{
locked = false;
user->WriteNumeric(989, "%s %s :Open for new connections", user->nick.c_str(), user->server);
- ServerInstance->SNO->WriteToSnoMask('A', "Oper %s used UNLOCKSERV to allow for new connections", user->nick.c_str());
+ ServerInstance->SNO->WriteGlobalSno('a', "Oper %s used UNLOCKSERV to allow for new connections", user->nick.c_str());
/* Dont send to the network */
return CMD_LOCALONLY;
}
{
private:
bool locked;
- CommandLockserv* lockcommand;
- CommandUnlockserv* unlockcommand;
+ CommandLockserv lockcommand;
+ CommandUnlockserv unlockcommand;
virtual void ResetLocked()
{
}
public:
- ModuleLockserv(InspIRCd* Me) : Module(Me)
+ ModuleLockserv(InspIRCd* Me) : Module(Me), lockcommand(Me, locked), unlockcommand(Me, locked)
{
ResetLocked();
- lockcommand = new CommandLockserv(ServerInstance, locked);
- ServerInstance->AddCommand(lockcommand);
-
- unlockcommand = new CommandUnlockserv(ServerInstance, locked);
- ServerInstance->AddCommand(unlockcommand);
+ ServerInstance->AddCommand(&lockcommand);
+ ServerInstance->AddCommand(&unlockcommand);
Implementation eventlist[] = { I_OnUserRegister, I_OnRehash, I_OnCheckReady };
ServerInstance->Modules->Attach(eventlist, this, 3);
}
}
- virtual void OnRehash(User* user, const std::string ¶meter)
+ virtual void OnRehash(User* user)
{
ResetLocked();
}