summaryrefslogtreecommitdiff
path: root/src/modules/m_sasl.cpp
diff options
context:
space:
mode:
authoraquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-05 02:06:59 +0000
committeraquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-05 02:06:59 +0000
commitb817341e2149af163011cce47605ae17b4f67eeb (patch)
treea347cf649563bf5f1f5de40f7514a5ded48c7c32 /src/modules/m_sasl.cpp
parentdfaa7b4e52e2cfbff79ab9ecad9904a07512b370 (diff)
Conversions
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9628 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_sasl.cpp')
-rw-r--r--src/modules/m_sasl.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp
index 259c3bd16..ffd6259ff 100644
--- a/src/modules/m_sasl.cpp
+++ b/src/modules/m_sasl.cpp
@@ -101,7 +101,7 @@ class SaslAuthenticator : public classbase
this->result = SASL_ABORT;
}
- bool SendClientMessage(const char* const* parameters, int pcnt)
+ bool SendClientMessage(const std::vector<std::string>& parameters)
{
if (this->state != SASL_COMM)
return true;
@@ -113,12 +113,11 @@ class SaslAuthenticator : public classbase
params.push_back(this->agent);
params.push_back("C");
- for (int i = 0; i < pcnt; ++i)
- params.push_back(parameters[i]);
+ params.insert(params.end(), parameters.begin(), parameters.end());
ServerInstance->PI->SendEncapsulatedData(params);
- if (*parameters[0] == '*')
+ if (parameters[0][0] == '*')
{
this->Abort();
return false;
@@ -166,7 +165,7 @@ class CommandAuthenticate : public Command
this->source = "m_sasl.so";
}
- CmdResult Handle (const char* const* parameters, int pcnt, User *user)
+ CmdResult Handle (const std::vector<std::string>& parameters, User *user)
{
/* Only allow AUTHENTICATE on unregistered clients */
if (user->registered != REG_ALL)
@@ -177,7 +176,7 @@ class CommandAuthenticate : public Command
SaslAuthenticator *sasl;
if (!(user->GetExt("sasl_authenticator", sasl)))
sasl = new SaslAuthenticator(user, parameters[0], ServerInstance, Creator);
- else if (sasl->SendClientMessage(parameters, pcnt) == false) // IAL abort extension --nenolod
+ else if (sasl->SendClientMessage(parameters) == false) // IAL abort extension --nenolod
delete sasl;
}
return CMD_FAILURE;