* | 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.
public:
CommandLockserv (InspIRCd* Instance, bool &lock)
- : Command(Instance, "LOCKSERV", 'o', 0), locked(lock)
+ : Command(Instance, "LOCKSERV", "o", 0), locked(lock)
{
this->source = "m_lockserv.so";
syntax.clear();
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const std::vector<std::string> ¶meters, User *user)
{
locked = true;
- user->WriteServ("988 %s %s :Closed for new connections", user->nick, user->server);
- ServerInstance->SNO->WriteToSnoMask('A', "Oper %s used LOCKSERV to temporarily close for new connections", user->nick);
+ user->WriteNumeric(988, "%s %s :Closed for new connections", user->nick.c_str(), user->server);
+ 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;
}
public:
CommandUnlockserv (InspIRCd* Instance, bool &lock)
- : Command(Instance, "UNLOCKSERV", 'o', 0), locked(lock)
+ : Command(Instance, "UNLOCKSERV", "o", 0), locked(lock)
{
this->source = "m_lockserv.so";
syntax.clear();
}
- CmdResult Handle (const char** parameters, int pcnt, User *user)
+ CmdResult Handle (const std::vector<std::string> ¶meters, User *user)
{
locked = false;
- user->WriteServ("989 %s %s :Open for new connections", user->nick, user->server);
- ServerInstance->SNO->WriteToSnoMask('A', "Oper %s used UNLOCKSERV to allow for new connections", user->nick);
+ user->WriteNumeric(989, "%s %s :Open for new connections", user->nick.c_str(), user->server);
+ 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;
}
}
- virtual void OnRehash(User* user, const std::string ¶meter)
+ virtual void OnRehash(User* user)
{
ResetLocked();
}
{
if (locked)
{
- User::QuitUser(ServerInstance, user, "Server is temporarily closed. Please try again later.");
+ ServerInstance->Users->QuitUser(user, "Server is temporarily closed. Please try again later.");
return 1;
}
return 0;
virtual Version GetVersion()
{
- return Version(1, 0, 0, 1, VF_VENDOR, API_VERSION);
+ return Version("$Id$", VF_VENDOR, API_VERSION);
}
};