summaryrefslogtreecommitdiff
path: root/src/modules/m_regonlycreate.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-06-18 19:10:07 +0200
committerattilamolnar <attilamolnar@hush.com>2013-07-19 19:40:04 +0200
commitfd1d19d6345943ecdb5ce4ef947f9b3c5c8bca86 (patch)
tree20ce1866b482808a85b34c7c09e53c3159617bc0 /src/modules/m_regonlycreate.cpp
parent882084defcc43c876ecb10e30086b63ac074fcad (diff)
Replace hardcoded mode letters, part 3
This changes most remaining User::IsModeSet() calls to use ModeReferences for modes that were created by other modules or the core
Diffstat (limited to 'src/modules/m_regonlycreate.cpp')
-rw-r--r--src/modules/m_regonlycreate.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modules/m_regonlycreate.cpp b/src/modules/m_regonlycreate.cpp
index 84058fbfa..6b6e059df 100644
--- a/src/modules/m_regonlycreate.cpp
+++ b/src/modules/m_regonlycreate.cpp
@@ -25,7 +25,14 @@
class ModuleRegOnlyCreate : public Module
{
+ UserModeReference regusermode;
+
public:
+ ModuleRegOnlyCreate()
+ : regusermode(this, "u_registered")
+ {
+ }
+
void init() CXX11_OVERRIDE
{
Implementation eventlist[] = { I_OnUserPreJoin };
@@ -40,7 +47,7 @@ class ModuleRegOnlyCreate : public Module
if (user->IsOper())
return MOD_RES_PASSTHRU;
- if (user->IsModeSet('r'))
+ if (user->IsModeSet(regusermode))
return MOD_RES_PASSTHRU;
const AccountExtItem* ext = GetAccountExtItem();