summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-10-11 01:02:03 +0100
committerPeter Powell <petpow@saberuk.com>2017-10-11 01:29:34 +0100
commit6acb2dcdd235e2594f800f33978e1a598c7792da (patch)
tree4a14593923506061783bc05487875f1d8e3ddd1a /src/modules
parent3c02b8018a6cd455676939ddf7a0145f060680a8 (diff)
Add a constant for the 477 numeric (ERR_NEEDREGGEDNICK).
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_services_account.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index 4f43ada3e..ac5730374 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -28,6 +28,9 @@
enum
{
+ // From ircd-hybrid?
+ ERR_NEEDREGGEDNICK = 477,
+
// From IRCv3 sasl-3.1.
RPL_LOGGEDIN = 900,
RPL_LOGGEDOUT = 901
@@ -216,7 +219,7 @@ class ModuleServicesAccount : public Module, public Whois::EventListener
if (c->IsModeSet(m2) && !is_registered && res != MOD_RES_ALLOW)
{
// user messaging a +M channel and is not registered
- user->WriteNumeric(477, c->name, "You need to be identified to a registered account to message this channel");
+ user->WriteNumeric(ERR_NEEDREGGEDNICK, c->name, "You need to be identified to a registered account to message this channel");
return MOD_RES_DENY;
}
}
@@ -227,7 +230,7 @@ class ModuleServicesAccount : public Module, public Whois::EventListener
if (u->IsModeSet(m3) && !is_registered)
{
// user messaging a +R user and is not registered
- user->WriteNumeric(477, u->nick, "You need to be identified to a registered account to message this user");
+ user->WriteNumeric(ERR_NEEDREGGEDNICK, u->nick, "You need to be identified to a registered account to message this user");
return MOD_RES_DENY;
}
}
@@ -282,7 +285,7 @@ class ModuleServicesAccount : public Module, public Whois::EventListener
if (!is_registered)
{
// joining a +R channel and not identified
- user->WriteNumeric(477, chan->name, "You need to be identified to a registered account to join this channel");
+ user->WriteNumeric(ERR_NEEDREGGEDNICK, chan->name, "You need to be identified to a registered account to join this channel");
return MOD_RES_DENY;
}
}