summaryrefslogtreecommitdiff
path: root/src/modules/m_conn_umodes.cpp
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-04 23:48:07 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-04 23:48:07 +0000
commit1eb52771d6a7fe8768baf8bad509de0facafbd2c (patch)
treea4020bcbaa6ef1a225e2cedca466408b53931790 /src/modules/m_conn_umodes.cpp
parentc2d1f2cdafb0a38446844f6bd3d683e8636e37b4 (diff)
Convert a few more
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9621 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_conn_umodes.cpp')
-rw-r--r--src/modules/m_conn_umodes.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/modules/m_conn_umodes.cpp b/src/modules/m_conn_umodes.cpp
index 15fe8c3f2..ba3d6968d 100644
--- a/src/modules/m_conn_umodes.cpp
+++ b/src/modules/m_conn_umodes.cpp
@@ -71,10 +71,9 @@ class ModuleModesOnConnect : public Module
while (ss >> buf)
tokens.push_back(buf);
- int size = tokens.size() + 1;
- const char** modes = new const char*[size];
+ std::vector<std::string> modes;
modes[0] = user->nick;
- modes[1] = tokens[0].c_str();
+ modes[1] = tokens[0];
if (tokens.size() > 1)
{
@@ -82,13 +81,12 @@ class ModuleModesOnConnect : public Module
int i = 2;
for (unsigned int k = 1; k < tokens.size(); k++)
{
- modes[i] = tokens[k].c_str();
+ modes[i] = tokens[k];
i++;
}
}
- ServerInstance->Parser->CallHandler("MODE", modes, size, user);
- delete [] modes;
+ ServerInstance->Parser->CallHandler("MODE", modes, user);
}
break;
}