From 6a2f6331eddd5a89ff02643f72e93151dab15547 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 8 May 2021 16:31:38 +0100 Subject: Add ChannelManager::IsPrefix. --- src/modules/m_blockamsg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/m_blockamsg.cpp') diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp index 2d929b15d..f76f211bc 100644 --- a/src/modules/m_blockamsg.cpp +++ b/src/modules/m_blockamsg.cpp @@ -85,12 +85,12 @@ class ModuleBlockAmsg : public Module // parameters[0] is the target list, count how many channels are there unsigned int targets = 0; // Is the first target a channel? - if (*parameters[0].c_str() == '#') + if (ServerInstance->Channels.IsPrefix(parameters[0][0])) targets = 1; for (const char* c = parameters[0].c_str(); *c; c++) { - if ((*c == ',') && (*(c+1) == '#')) + if (*c == ',' && ServerInstance->Channels.IsPrefix(*(c + 1))) targets++; } -- cgit v1.3.1-10-gc9f91