aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_blockamsg.cpp
diff options
context:
space:
mode:
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++;
}