aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_timedbans.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2019-02-07 12:14:37 +0000
committerGravatar Sadie Powell2019-02-07 12:14:37 +0000
commit7ba7290bf07b4fb4d25566ee042fd43f9e129617 (patch)
treec7a784c828a9be68f963776e5cdcdd1f088f4790 /src/modules/m_timedbans.cpp
parentLogManager: remove fakederef. (diff)
downloadinspircd++-7ba7290bf07b4fb4d25566ee042fd43f9e129617.tar.gz
inspircd++-7ba7290bf07b4fb4d25566ee042fd43f9e129617.tar.bz2
inspircd++-7ba7290bf07b4fb4d25566ee042fd43f9e129617.zip
ModeParser: remove fakederef.
Diffstat (limited to 'src/modules/m_timedbans.cpp')
-rw-r--r--src/modules/m_timedbans.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index 80762e320..08158ece8 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -103,11 +103,11 @@ class CommandTban : public Command
}
Modes::ChangeList setban;
- setban.push_add(ServerInstance->Modes->FindMode('b', MODETYPE_CHANNEL), mask);
+ setban.push_add(ServerInstance->Modes.FindMode('b', MODETYPE_CHANNEL), mask);
// Pass the user (instead of ServerInstance->FakeClient) to ModeHandler::Process() to
// make it so that the user sets the mode themselves
- ServerInstance->Modes->Process(user, channel, NULL, setban);
- if (ServerInstance->Modes->GetLastChangeList().empty())
+ ServerInstance->Modes.Process(user, channel, NULL, setban);
+ if (ServerInstance->Modes.GetLastChangeList().empty())
{
user->WriteNotice("Invalid ban mask");
return CMD_FAILURE;
@@ -120,7 +120,7 @@ class CommandTban : public Command
const std::string addban = user->nick + " added a timed ban on " + mask + " lasting for " + ConvToStr(duration) + " seconds.";
// If halfop is loaded, send notice to halfops and above, otherwise send to ops and above
- PrefixMode* mh = ServerInstance->Modes->FindPrefixMode('h');
+ PrefixMode* mh = ServerInstance->Modes.FindPrefixMode('h');
char pfxchar = (mh && mh->name == "halfop") ? mh->GetPrefix() : '@';
ClientProtocol::Messages::Privmsg notice(ServerInstance->FakeClient, channel, addban, MSG_NOTICE);
@@ -212,7 +212,7 @@ class ModuleTimedBans : public Module
{
const std::string expiry = "*** Timed ban on " + cr->name + " expired.";
// If halfop is loaded, send notice to halfops and above, otherwise send to ops and above
- PrefixMode* mh = ServerInstance->Modes->FindPrefixMode('h');
+ PrefixMode* mh = ServerInstance->Modes.FindPrefixMode('h');
char pfxchar = (mh && mh->name == "halfop") ? mh->GetPrefix() : '@';
ClientProtocol::Messages::Privmsg notice(ClientProtocol::Messages::Privmsg::nocopy, ServerInstance->FakeClient, cr, expiry, MSG_NOTICE);
@@ -220,8 +220,8 @@ class ModuleTimedBans : public Module
ServerInstance->PI->SendChannelNotice(cr, pfxchar, expiry);
Modes::ChangeList setban;
- setban.push_remove(ServerInstance->Modes->FindMode('b', MODETYPE_CHANNEL), mask);
- ServerInstance->Modes->Process(ServerInstance->FakeClient, cr, NULL, setban);
+ setban.push_remove(ServerInstance->Modes.FindMode('b', MODETYPE_CHANNEL), mask);
+ ServerInstance->Modes.Process(ServerInstance->FakeClient, cr, NULL, setban);
}
}
}