* | 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
CmdResult Handle (const std::vector<std::string> ¶meters, User *user)
{
locked = true;
- user->WriteNumeric(988, "%s %s :Closed for new connections", user->nick.c_str(), user->server);
+ user->WriteNumeric(988, "%s %s :Closed for new connections", user->nick.c_str(), user->server.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_SUCCESS;
CmdResult Handle (const std::vector<std::string> ¶meters, User *user)
{
locked = false;
- user->WriteNumeric(989, "%s %s :Open for new connections", user->nick.c_str(), user->server);
+ user->WriteNumeric(989, "%s %s :Open for new connections", user->nick.c_str(), user->server.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_SUCCESS;
}
public:
- ModuleLockserv(InspIRCd* Me) : lockcommand(this, locked), unlockcommand(this, locked)
+ ModuleLockserv() : lockcommand(this, locked), unlockcommand(this, locked)
{
ResetLocked();
ServerInstance->AddCommand(&lockcommand);
ResetLocked();
}
- virtual ModResult OnUserRegister(User* user)
+ virtual ModResult OnUserRegister(LocalUser* user)
{
if (locked)
{
return MOD_RES_PASSTHRU;
}
- virtual ModResult OnCheckReady(User* user)
+ virtual ModResult OnCheckReady(LocalUser* user)
{
return locked ? MOD_RES_DENY : MOD_RES_PASSTHRU;
}
virtual Version GetVersion()
{
- return Version("Allows locking of the server to stop all incoming connections till unlocked again", VF_VENDOR, API_VERSION);
+ return Version("Allows locking of the server to stop all incoming connections till unlocked again", VF_VENDOR);
}
};