X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_lockserv.cpp;h=48d9801eeffd31eaeb29c718e224ac4ff22ca4c7;hb=4132a44396d8fa3d23f87b5cbea5b928aa09769f;hp=7c1bb5bd35c902639907aa9f41a8ee4533115b15;hpb=bf66b6dedd226b9967d876a3869b1766af38d596;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_lockserv.cpp b/src/modules/m_lockserv.cpp index 7c1bb5bd3..48d9801ee 100644 --- a/src/modules/m_lockserv.cpp +++ b/src/modules/m_lockserv.cpp @@ -24,6 +24,12 @@ * 988 :Closed for new connections * 989 :Open for new connections */ +enum +{ + // InspIRCd-specific. + RPL_SERVLOCKON = 988, + RPL_SERVLOCKOFF = 989 +}; class CommandLockserv : public Command { @@ -36,7 +42,7 @@ class CommandLockserv : public Command flags_needed = 'o'; } - CmdResult Handle (const std::vector ¶meters, User *user) + CmdResult Handle(const std::vector& parameters, User* user) CXX11_OVERRIDE { if (!locked.empty()) { @@ -45,7 +51,7 @@ class CommandLockserv : public Command } locked = parameters.empty() ? "Server is temporarily closed. Please try again later." : parameters[0]; - user->WriteNumeric(988, user->server->GetName(), "Closed for new connections"); + user->WriteNumeric(RPL_SERVLOCKON, user->server->GetName(), "Closed for new connections"); ServerInstance->SNO->WriteGlobalSno('a', "Oper %s used LOCKSERV to temporarily disallow new connections", user->nick.c_str()); return CMD_SUCCESS; } @@ -61,7 +67,7 @@ class CommandUnlockserv : public Command flags_needed = 'o'; } - CmdResult Handle (const std::vector ¶meters, User *user) + CmdResult Handle(const std::vector& parameters, User* user) CXX11_OVERRIDE { if (locked.empty()) { @@ -70,7 +76,7 @@ class CommandUnlockserv : public Command } locked.clear(); - user->WriteNumeric(989, user->server->GetName(), "Open for new connections"); + user->WriteNumeric(RPL_SERVLOCKOFF, user->server->GetName(), "Open for new connections"); ServerInstance->SNO->WriteGlobalSno('a', "Oper %s used UNLOCKSERV to allow new connections", user->nick.c_str()); return CMD_SUCCESS; }