From dc169e9d588d5536ca13f64f22e2a8aaea34604b Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 18 Jun 2021 17:36:34 +0100 Subject: Avoid unnecessarily looking up the ban mode. We already have a ChanModeReference for this there's no need to look it up again. --- src/modules/m_timedbans.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/m_timedbans.cpp') diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp index 6cc5d01e6..23dbf46c1 100644 --- a/src/modules/m_timedbans.cpp +++ b/src/modules/m_timedbans.cpp @@ -118,7 +118,7 @@ class CommandTban : public Command } Modes::ChangeList setban; - setban.push_add(ServerInstance->Modes->FindMode('b', MODETYPE_CHANNEL), mask); + setban.push_add(*banmode, 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); -- cgit v1.3.1-10-gc9f91