aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_timedbans.cpp
diff options
context:
space:
mode:
authorGravatar Peter Powell2019-11-17 22:06:36 +0000
committerGravatar Peter Powell2019-11-17 22:17:42 +0000
commit687778b72e31322a73b2e2e17af6bd0f2a2561bc (patch)
treed492c428f43378723357a0f82a2cb73ba994ad83 /src/modules/m_timedbans.cpp
parentClose connections when an I/O hook is configured but not loaded. (diff)
downloadinspircd++-687778b72e31322a73b2e2e17af6bd0f2a2561bc.tar.gz
inspircd++-687778b72e31322a73b2e2e17af6bd0f2a2561bc.tar.bz2
inspircd++-687778b72e31322a73b2e2e17af6bd0f2a2561bc.zip
Allow Channel::WriteNotice send to other servers and status ranks.
Diffstat (limited to 'src/modules/m_timedbans.cpp')
-rw-r--r--src/modules/m_timedbans.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp
index ef3382e4b..eb3c47527 100644
--- a/src/modules/m_timedbans.cpp
+++ b/src/modules/m_timedbans.cpp
@@ -128,9 +128,7 @@ class CommandTban : public Command
PrefixMode* mh = ServerInstance->Modes->FindPrefixMode('h');
char pfxchar = (mh && mh->name == "halfop") ? mh->GetPrefix() : '@';
- ClientProtocol::Messages::Privmsg notice(ServerInstance->FakeClient, channel, message, MSG_NOTICE);
- channel->Write(ServerInstance->GetRFCEvents().privmsg, notice, pfxchar);
- ServerInstance->PI->SendChannelNotice(channel, pfxchar, message);
+ channel->WriteNotice(message, pfxchar);
return CMD_SUCCESS;
}
@@ -221,9 +219,7 @@ class ModuleTimedBans : public Module
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, message, MSG_NOTICE);
- cr->Write(ServerInstance->GetRFCEvents().privmsg, notice, pfxchar);
- ServerInstance->PI->SendChannelNotice(cr, pfxchar, message);
+ cr->WriteNotice(message, pfxchar);
Modes::ChangeList setban;
setban.push_remove(ServerInstance->Modes->FindMode('b', MODETYPE_CHANNEL), mask);