diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-03-06 22:28:57 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-03-06 22:28:57 +0000 |
commit | 526f5a4a02882b19056fe755dff1f64b764ff313 (patch) | |
tree | 6a9e92e4f3f7088b18dcdde360d07c911ee174df /src/modules/m_chanprotect.cpp | |
parent | eacd707421be4f2612df9bde4517649061bb062e (diff) |
Construct explicit parameter type list for MODE parameters
Previously, we used TR_SPACENICKLIST on the parameters. This worked only because
usually, if anything in the list parsed as a nick, then it was a nick. However,
some modes like +k and +g allow free-form text, which could also resolve as a
nick. Add extra parameters to allow modes to specify their TranslateType,
defaulting to TR_TEXT.
This fixes bug #757, found by Taros
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11180 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_chanprotect.cpp')
-rw-r--r-- | src/modules/m_chanprotect.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index 85c8660a2..627857175 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -159,7 +159,7 @@ class ChanFounder : public ModeHandler, public FounderProtectBase { public: ChanFounder(InspIRCd* Instance, char my_prefix, bool &depriv_self, bool &depriv_others) - : ModeHandler(Instance, 'q', 1, 1, true, MODETYPE_CHANNEL, false, my_prefix, 0), + : ModeHandler(Instance, 'q', 1, 1, true, MODETYPE_CHANNEL, false, my_prefix, 0, TR_NICK), FounderProtectBase(Instance, "cm_founder_", "founder", 386, 387, depriv_self, depriv_others) { } unsigned int GetPrefixRank() @@ -235,7 +235,7 @@ class ChanProtect : public ModeHandler, public FounderProtectBase { public: ChanProtect(InspIRCd* Instance, char my_prefix, bool &depriv_self, bool &depriv_others) - : ModeHandler(Instance, 'a', 1, 1, true, MODETYPE_CHANNEL, false, my_prefix, 0), + : ModeHandler(Instance, 'a', 1, 1, true, MODETYPE_CHANNEL, false, my_prefix, 0, TR_NICK), FounderProtectBase(Instance,"cm_protect_","protected user", 388, 389, depriv_self, depriv_others) { } unsigned int GetPrefixRank() |