From 7ba7290bf07b4fb4d25566ee042fd43f9e129617 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 7 Feb 2019 12:14:37 +0000 Subject: ModeParser: remove fakederef. --- src/modules/m_timedbans.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/modules/m_timedbans.cpp') 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); } } } -- cgit v1.3.1-10-gc9f91