diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-14 22:40:27 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-14 22:40:27 +0000 |
commit | dce072ab7771efc5f6c2697c926b3a56dfe98a18 (patch) | |
tree | 54aa45cee699a2b28aae49269df2b0fbe5e32b1c /src/modules | |
parent | 01ad96170c21d0b990b48c535c1c4b3cd5b186e0 (diff) |
Fixed properly this time
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7317 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_opermodes.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp index a8aa615cf..e358492bc 100644 --- a/src/modules/m_opermodes.cpp +++ b/src/modules/m_opermodes.cpp @@ -65,14 +65,14 @@ 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 != "") + if (!ThisOpersModes.empty()) { + char first = *(ThisOpersModes.c_str()); + if ((first != '+') && (first != '-')) + ThisOpersModes = "+" + ThisOpersModes; + std::string buf; stringstream ss(ThisOpersModes); - vector<string> tokens; // split ThisOperModes into modes and mode params @@ -85,7 +85,7 @@ class ModuleModesOnOper : public Module // process mode params int i = 1; - for (unsigned int k = 1; k < tokens.size(); k++) + for (unsigned int k = 0; k < tokens.size(); k++) { modes[i] = tokens[k].c_str(); i++; @@ -106,8 +106,6 @@ class ModuleModesOnOper : public Module } }; -// stuff down here is the module-factory stuff. For basic modules you can ignore this. - class ModuleModesOnOperFactory : public ModuleFactory { public: |