summaryrefslogtreecommitdiff
path: root/src/modules/m_chanprotect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_chanprotect.cpp')
-rw-r--r--src/modules/m_chanprotect.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index 698e2fbc1..b7765012e 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -65,7 +65,8 @@ class ModuleChanProtect : public Module
}
temp2 = temp2 + temp1 + " ";
}
- output = temp2.substr(0,temp2.length()-1);
+ if (temp2.length())
+ output = temp2.substr(0,temp2.length()-1);
}
virtual void OnUserPart(userrec* user, chanrec* channel)