diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-05 03:40:03 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-05 03:40:03 +0000 |
commit | f9ef4ebc9dc4fd46cdafcc76df644b4896251dac (patch) | |
tree | 69072581bc1249d279dd62f2f2625f29c01b3294 /src/modules/m_opermodes.cpp | |
parent | e8bf6e5fdbcfa2d3c86541eb27e88ab8c1137c07 (diff) |
fix some unitialised vectors and tidy up a bit.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9637 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_opermodes.cpp')
-rw-r--r-- | src/modules/m_opermodes.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp index 8a91c3569..4184409f1 100644 --- a/src/modules/m_opermodes.cpp +++ b/src/modules/m_opermodes.cpp @@ -99,17 +99,13 @@ class ModuleModesOnOper : public Module while (ss >> buf) tokens.push_back(buf); - int size = tokens.size() + 1; - std::vector<std::string> modes(size); - modes.resize(size); - modes[0] = u->nick; + std::vector<std::string> modes; + modes.push_back(u->nick); // process mode params - int i = 1; for (unsigned int k = 0; k < tokens.size(); k++) { - modes[i] = tokens[k].c_str(); - i++; + modes.push_back(tokens[k]); } std::deque<std::string> n; |