diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:31:33 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:31:33 +0000 |
commit | 1524caf2f799cff54c2de330c9670a0b761ba3d8 (patch) | |
tree | 45fffe020b28782a087925c94fb5195fb9b4796b /src/modules/m_chanprotect.cpp | |
parent | 7892c8a0313c50d8138942ff3b112691caf05a2f (diff) |
Simplify ModeHandler constructor
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11701 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_chanprotect.cpp')
-rw-r--r-- | src/modules/m_chanprotect.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index 1e03da617..fd121edcf 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -119,8 +119,14 @@ class ChanFounder : public ModeHandler, public FounderProtectBase { public: ChanFounder(InspIRCd* Instance, Module* Creator, char my_prefix, bool &depriv_self, bool &depriv_others) - : ModeHandler(Instance, Creator, 'q', 1, 1, true, MODETYPE_CHANNEL, false, my_prefix, 0, TR_NICK), - FounderProtectBase(Instance, 'q', "founder", 386, 387, depriv_self, depriv_others) { } + : ModeHandler(Creator, 'q', PARAM_ALWAYS, MODETYPE_CHANNEL), + FounderProtectBase(Instance, 'q', "founder", 386, 387, depriv_self, depriv_others) + { + ModeHandler::list = true; + prefix = my_prefix; + levelrequired = FOUNDER_VALUE; + m_paramtype = TR_NICK; + } unsigned int GetPrefixRank() { @@ -194,8 +200,14 @@ class ChanProtect : public ModeHandler, public FounderProtectBase { public: ChanProtect(InspIRCd* Instance, Module* Creator, char my_prefix, bool &depriv_self, bool &depriv_others) - : ModeHandler(Instance, Creator, 'a', 1, 1, true, MODETYPE_CHANNEL, false, my_prefix, 0, TR_NICK), - FounderProtectBase(Instance,'a',"protected user", 388, 389, depriv_self, depriv_others) { } + : ModeHandler(Creator, 'a', PARAM_ALWAYS, MODETYPE_CHANNEL), + FounderProtectBase(Instance,'a',"protected user", 388, 389, depriv_self, depriv_others) + { + ModeHandler::list = true; + prefix = my_prefix; + levelrequired = PROTECT_VALUE; + m_paramtype = TR_NICK; + } unsigned int GetPrefixRank() { |