aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_delaymsg.cpp
diff options
context:
space:
mode:
authorGravatar Daniel De Graaf2010-02-09 16:02:23 -0600
committerGravatar Daniel De Graaf2010-08-03 17:32:35 -0400
commit1dc169ac6bb57f7839b0af45a39af6336d6bd72a (patch)
tree9d60f791babafc7ea06a0bdc5941cee65fe4dd75 /src/modules/m_delaymsg.cpp
parentAllow listmodes to be viewed via PROP (diff)
Add support for <modeletters> config block to adjust mode letters
Diffstat (limited to 'src/modules/m_delaymsg.cpp')
-rw-r--r--src/modules/m_delaymsg.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp
index 89d62a6a0..8a774a754 100644
--- a/src/modules/m_delaymsg.cpp
+++ b/src/modules/m_delaymsg.cpp
@@ -26,6 +26,7 @@ class DelayMsgMode : public ModeHandler
, jointime("delaymsg", Parent)
{
levelrequired = OP_VALUE;
+ fixed_letter = false;
}
bool ResolveModeConflict(std::string &their_param, const std::string &our_param, Channel*)
@@ -77,7 +78,7 @@ 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 : "");
+ channel->SetModeParam(this, adding ? parameter : "");
return MODEACTION_ALLOW;
}
@@ -92,7 +93,7 @@ Version ModuleDelayMsg::GetVersion()
void ModuleDelayMsg::OnUserJoin(Membership* memb, bool sync, bool created, CUList&)
{
- if (memb->chan->IsModeSet('d'))
+ if (memb->chan->IsModeSet(&djm))
{
djm.jointime.set(memb, ServerInstance->Time());
}
@@ -118,7 +119,7 @@ ModResult ModuleDelayMsg::OnUserPreMessage(User* user, void* dest, int target_ty
if (ts == 0)
return MOD_RES_PASSTHRU;
- std::string len = channel->GetModeParameter('d');
+ std::string len = channel->GetModeParameter(&djm);
if (ts + atoi(len.c_str()) > ServerInstance->Time())
{