summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_sqllog.cpp4
-rw-r--r--src/modules/extra/m_sqloper.cpp8
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp2
-rw-r--r--src/modules/extra/m_ssl_oper_cert.cpp8
-rw-r--r--src/modules/extra/m_sslinfo.cpp4
5 files changed, 14 insertions, 12 deletions
diff --git a/src/modules/extra/m_sqllog.cpp b/src/modules/extra/m_sqllog.cpp
index ddcd9e4d2..16746f690 100644
--- a/src/modules/extra/m_sqllog.cpp
+++ b/src/modules/extra/m_sqllog.cpp
@@ -276,11 +276,11 @@ class ModuleSQLLog : public Module
return 0;
}
- virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const std::vector<std::string> &parameters, User *user, bool validated, const std::string &original_line)
{
if ((command == "GLINE" || command == "KLINE" || command == "ELINE" || command == "ZLINE") && validated)
{
- AddLogEntry(LT_XLINE,user->nick,command[0]+std::string(":")+std::string(parameters[0]),user->server);
+ AddLogEntry(LT_XLINE,user->nick,command[0]+std::string(":")+parameters[0],user->server);
}
return 0;
}
diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp
index fc3a76a6e..09b577aed 100644
--- a/src/modules/extra/m_sqloper.cpp
+++ b/src/modules/extra/m_sqloper.cpp
@@ -111,7 +111,7 @@ public:
hashtype = assign(Conf.ReadValue("sqloper", "hash", 0));
}
- virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const std::vector<std::string> &parameters, User *user, bool validated, const std::string &original_line)
{
if ((validated) && (command == "OPER"))
{
@@ -276,8 +276,10 @@ public:
if (oper_command)
{
- const char* params[] = { username.c_str(), pass.c_str() };
- oper_command->Handle(params, 2, user);
+ std::vector<std::string> params;
+ params[0] = username;
+ params[1] = pass;
+ oper_command->Handle(params, user);
}
else
{
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 6515670fe..4b9d0fc4e 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -73,7 +73,7 @@ class CommandStartTLS : public Command
this->source = "m_ssl_gnutls.so";
}
- CmdResult Handle (const char* const* parameters, int pcnt, User *user)
+ CmdResult Handle (const std::vector<std::string> &parameters, User *user)
{
user->io = Caller;
Caller->OnRawSocketAccept(user->GetFd(), user->GetIPString(), user->GetPort());
diff --git a/src/modules/extra/m_ssl_oper_cert.cpp b/src/modules/extra/m_ssl_oper_cert.cpp
index e06d746b7..34d947816 100644
--- a/src/modules/extra/m_ssl_oper_cert.cpp
+++ b/src/modules/extra/m_ssl_oper_cert.cpp
@@ -33,7 +33,7 @@ class cmd_fingerprint : public Command
syntax = "<nickname>";
}
- CmdResult Handle (const char* const* parameters, int pcnt, User *user)
+ CmdResult Handle (const std::vector<std::string> &parameters, User *user)
{
User* target = ServerInstance->FindNick(parameters[0]);
if (target)
@@ -60,7 +60,7 @@ class cmd_fingerprint : public Command
}
else
{
- user->WriteNumeric(401, "%s %s :No such nickname", user->nick, parameters[0]);
+ user->WriteNumeric(401, "%s %s :No such nickname", user->nick, parameters[0].c_str());
return CMD_FAILURE;
}
}
@@ -112,7 +112,7 @@ class ModuleOperSSLCert : public Module
return false;
}
- virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line)
+ virtual int OnPreCommand(const std::string &command, const std::vector<std::string> &parameters, User *user, bool validated, const std::string &original_line)
{
irc::string cmd = command.c_str();
@@ -146,7 +146,7 @@ class ModuleOperSSLCert : public Module
if (SSLOnly || !FingerPrint.empty())
{
- if ((!strcmp(LoginName.c_str(),parameters[0])) && (!ServerInstance->PassCompare(user, Password.c_str(),parameters[1], HashType.c_str())) && (OneOfMatches(TheHost,TheIP,HostName.c_str())))
+ if ((!strcmp(LoginName.c_str(),parameters[0].c_str())) && (!ServerInstance->PassCompare(user, Password.c_str(),parameters[1].c_str(), HashType.c_str())) && (OneOfMatches(TheHost,TheIP,HostName.c_str())))
{
if (SSLOnly && !user->GetExt("ssl", dummy))
{
diff --git a/src/modules/extra/m_sslinfo.cpp b/src/modules/extra/m_sslinfo.cpp
index f8a06bc2e..910a6b808 100644
--- a/src/modules/extra/m_sslinfo.cpp
+++ b/src/modules/extra/m_sslinfo.cpp
@@ -33,7 +33,7 @@ class cmd_sslinfo : public Command
this->syntax = "<nick>";
}
- CmdResult Handle (const char* const* parameters, int pcnt, User *user)
+ CmdResult Handle (const std::vector<std::string> &parameters, User *user)
{
User* target = ServerInstance->FindNick(parameters[0]);
ssl_cert* cert;
@@ -58,7 +58,7 @@ class cmd_sslinfo : public Command
}
}
else
- user->WriteNumeric(401, "%s %s :No such nickname", user->nick, parameters[0]);
+ user->WriteNumeric(401, "%s %s :No such nickname", user->nick, parameters[0].c_str());
return CMD_FAILURE;
}