summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-29 20:37:34 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-29 20:37:34 +0000
commita3c403ef79b483026cfc87ded6091b8940971732 (patch)
treedd3616642c4fdd26b81e15a378fad0ad497d5252 /src
parent6dfd6f39848f9133da16a81f2cf7407d3410af78 (diff)
Auto-assume "+" on the start of opermode block if not included
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2971 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_opermodes.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp
index 3f840f894..a49cb34e8 100644
--- a/src/modules/m_opermodes.cpp
+++ b/src/modules/m_opermodes.cpp
@@ -64,6 +64,9 @@ class ModuleModesOnOper : public Module
if (!strcmp(typen.c_str(),user->oper))
{
std::string ThisOpersModes = Conf->ReadValue("type","modes",j);
+ char first = *(ThisOpersModes.c_str());
+ if ((first != '+') && (first != '-'))
+ ThisOpersModes = "+" + ThisOpersModes;
if (ThisOpersModes != "")
{
char* modes[2];