aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_blockamsg.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-05-08 16:31:38 +0100
committerGravatar Sadie Powell2021-05-08 17:16:11 +0100
commit6a2f6331eddd5a89ff02643f72e93151dab15547 (patch)
tree0c8a672e4a461fe0d743a6d181b01c961d992df6 /src/modules/m_blockamsg.cpp
parentConstify ChannelManager::Find. (diff)
Add ChannelManager::IsPrefix.
Diffstat (limited to 'src/modules/m_blockamsg.cpp')
-rw-r--r--src/modules/m_blockamsg.cpp4
1 files changed, 2 insertions, 2 deletions
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++;
}