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