summaryrefslogtreecommitdiff
path: root/src/modules/m_operchans.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_operchans.cpp')
-rw-r--r--src/modules/m_operchans.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp
index 2e6fad79f..8db2a4041 100644
--- a/src/modules/m_operchans.cpp
+++ b/src/modules/m_operchans.cpp
@@ -59,7 +59,7 @@ class ModuleOperChans : public Module
ModResult OnCheckBan(User *user, Channel *c, const std::string& mask)
{
- if (mask[0] == 'O' && mask[1] == ':')
+ if ((mask.length() > 2) && (mask[0] == 'O') && (mask[1] == ':'))
{
if (IS_OPER(user) && InspIRCd::Match(user->oper->name, mask.substr(2)))
return MOD_RES_DENY;