From b13b1b8a0613e48013ca9f6a5279559d0aee0f73 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Tue, 5 Sep 2017 17:54:40 +0100 Subject: Convert uncontroversial anonymous numerics to use constants. --- src/modules/m_lockserv.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/modules/m_lockserv.cpp') diff --git a/src/modules/m_lockserv.cpp b/src/modules/m_lockserv.cpp index 7c1bb5bd3..068573e0d 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 { @@ -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; } @@ -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; } -- cgit v1.3.1-10-gc9f91