diff options
| author | 2017-09-05 17:54:40 +0100 | |
|---|---|---|
| committer | 2017-09-06 10:44:41 +0100 | |
| commit | b13b1b8a0613e48013ca9f6a5279559d0aee0f73 (patch) | |
| tree | 963c043afff8d92edfd774f034b2fb0b9f1e2517 /src/modules/m_lockserv.cpp | |
| parent | Change the numerics used by /COMMANDS to avoid a collision. (diff) | |
Convert uncontroversial anonymous numerics to use constants.
Diffstat (limited to 'src/modules/m_lockserv.cpp')
| -rw-r--r-- | src/modules/m_lockserv.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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 <nick> <servername> :Closed for new connections * 989 <nick> <servername> :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; } |
