diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-06-13 19:00:01 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-06-13 19:00:01 +0200 |
commit | 95593de52c9b89dd3dae8d79a2c76efc81d9d353 (patch) | |
tree | c99c8b3172b299a7d520faf7b5e69d0e3196aa05 /src/modules | |
parent | c25a59d9036444872d831a126c6326f3d8be5e74 (diff) |
Call Channel::SetModeParam() from the mode parser when needed instead of requiring mode handlers to do it
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_chanhistory.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_delaymsg.cpp | 1 | ||||
-rw-r--r-- | src/modules/m_joinflood.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_kicknorejoin.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_messageflood.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_nickflood.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_redirect.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_repeat.cpp | 2 |
8 files changed, 0 insertions, 15 deletions
diff --git a/src/modules/m_chanhistory.cpp b/src/modules/m_chanhistory.cpp index c114891bb..9c4f644d7 100644 --- a/src/modules/m_chanhistory.cpp +++ b/src/modules/m_chanhistory.cpp @@ -94,14 +94,12 @@ class HistoryMode : public ModeHandler { ext.set(channel, new HistoryList(len, time)); } - channel->SetModeParam('H', parameter); } else { if (!channel->IsModeSet('H')) return MODEACTION_DENY; ext.unset(channel); - channel->SetModeParam('H', ""); } return MODEACTION_ALLOW; } diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp index 8391dc45e..aeb4e4932 100644 --- a/src/modules/m_delaymsg.cpp +++ b/src/modules/m_delaymsg.cpp @@ -87,7 +87,6 @@ ModeAction DelayMsgMode::OnModeChange(User* source, User* dest, Channel* channel for (UserMembCIter n = names->begin(); n != names->end(); ++n) jointime.set(n->second, 0); } - channel->SetModeParam('d', adding ? parameter : ""); return MODEACTION_ALLOW; } diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index fde974559..53277150a 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -119,7 +119,6 @@ class JoinFlood : public ModeHandler ext.set(channel, jfs); parameter = ConvToStr(njoins) + ":" + ConvToStr(nsecs); - channel->SetModeParam(this, parameter); return MODEACTION_ALLOW; } else @@ -131,7 +130,6 @@ class JoinFlood : public ModeHandler if (f) { ext.unset(channel); - channel->SetModeParam(this, ""); return MODEACTION_ALLOW; } } diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp index 3406f4f99..01d3aee71 100644 --- a/src/modules/m_kicknorejoin.cpp +++ b/src/modules/m_kicknorejoin.cpp @@ -56,7 +56,6 @@ class KickRejoin : public ModeHandler v = max; parameter = ConvToStr(v); - channel->SetModeParam(this, parameter); } else { @@ -64,7 +63,6 @@ class KickRejoin : public ModeHandler return MODEACTION_DENY; ext.unset(channel); - channel->SetModeParam(this, ""); } return MODEACTION_ALLOW; } diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index 86296094b..2e91cdf06 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -102,7 +102,6 @@ class MsgFlood : public ModeHandler ext.set(channel, new floodsettings(ban, nsecs, nlines)); parameter = std::string(ban ? "*" : "") + ConvToStr(nlines) + ":" + ConvToStr(nsecs); - channel->SetModeParam('f', parameter); return MODEACTION_ALLOW; } else @@ -111,7 +110,6 @@ class MsgFlood : public ModeHandler return MODEACTION_DENY; ext.unset(channel); - channel->SetModeParam('f', ""); return MODEACTION_ALLOW; } } diff --git a/src/modules/m_nickflood.cpp b/src/modules/m_nickflood.cpp index de9b64f99..61347ded0 100644 --- a/src/modules/m_nickflood.cpp +++ b/src/modules/m_nickflood.cpp @@ -115,7 +115,6 @@ class NickFlood : public ModeHandler ext.set(channel, new nickfloodsettings(nsecs, nnicks)); parameter = ConvToStr(nnicks) + ":" + ConvToStr(nsecs); - channel->SetModeParam('F', parameter); return MODEACTION_ALLOW; } else @@ -124,7 +123,6 @@ class NickFlood : public ModeHandler return MODEACTION_DENY; ext.unset(channel); - channel->SetModeParam('F', ""); return MODEACTION_ALLOW; } } diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index 000d53a2e..e40339fa6 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -70,14 +70,12 @@ class Redirect : public ModeHandler * We used to do some checking for circular +L here, but there is no real need for this any more especially as we * now catch +L looping in PreJoin. Remove it, since O(n) logic makes me sad, and we catch it anyway. :) -- w00t */ - channel->SetModeParam('L', parameter); return MODEACTION_ALLOW; } else { if (channel->IsModeSet('L')) { - channel->SetModeParam('L', ""); return MODEACTION_ALLOW; } } diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp index 86f26016d..342ee9783 100644 --- a/src/modules/m_repeat.cpp +++ b/src/modules/m_repeat.cpp @@ -131,7 +131,6 @@ class RepeatMode : public ModeHandler MemberInfoExt.unset(i->second); ChanSet.unset(channel); - channel->SetModeParam(this, ""); return MODEACTION_ALLOW; } @@ -156,7 +155,6 @@ class RepeatMode : public ModeHandler return MODEACTION_DENY; ChanSet.set(channel, settings); - channel->SetModeParam(this, parameter); return MODEACTION_ALLOW; } |