summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-05 02:25:06 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-05 02:25:06 +0000
commit943aae0168538f7a59f8f6ccabee2568cc3d4ab1 (patch)
tree3c327a754513e980d6d457bd829ab671f342f51c /src
parentb817341e2149af163011cce47605ae17b4f67eeb (diff)
Convert more
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9629 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_namesx.cpp4
-rw-r--r--src/modules/m_operlog.cpp6
-rw-r--r--src/modules/m_override.cpp2
-rw-r--r--src/modules/m_safelist.cpp15
-rw-r--r--src/modules/m_securelist.cpp2
5 files changed, 15 insertions, 14 deletions
diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp
index 97a7ef790..e9b109f5c 100644
--- a/src/modules/m_namesx.cpp
+++ b/src/modules/m_namesx.cpp
@@ -48,7 +48,7 @@ class ModuleNamesX : public Module
output.append(" NAMESX");
}
- 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 c = command.c_str();
/* We don't actually create a proper command handler class for PROTOCTL,
@@ -58,7 +58,7 @@ class ModuleNamesX : public Module
*/
if (c == "PROTOCTL")
{
- if ((pcnt) && (!strcasecmp(parameters[0],"NAMESX")))
+ if ((parameters.size()) && (!strcasecmp(parameters[0].c_str(),"NAMESX")))
{
user->Extend("NAMESX");
return 1;
diff --git a/src/modules/m_operlog.cpp b/src/modules/m_operlog.cpp
index aa7923be9..25a3f1203 100644
--- a/src/modules/m_operlog.cpp
+++ b/src/modules/m_operlog.cpp
@@ -37,7 +37,7 @@ class ModuleOperLog : public Module
}
- 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 the command doesnt appear to be valid, we dont want to mess with it. */
if (!validated)
@@ -49,8 +49,8 @@ class ModuleOperLog : public Module
if ((thiscommand) && (thiscommand->flags_needed == 'o'))
{
std::string plist;
- for (int j = 0; j < pcnt; j++)
- plist.append(std::string(" ")+std::string(parameters[j]));
+ for (int j = 0; j < (int)parameters.size(); j++)
+ plist.append(std::string(" ")+parameters[j]);
ServerInstance->Logs->Log("m_operlog",DEFAULT,"OPERLOG: [%s!%s@%s] %s%s",user->nick,user->ident,user->host,command.c_str(),plist.c_str());
}
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index 74a8aa389..054d56a4b 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -63,7 +63,7 @@ class ModuleOverride : public Module
}
- virtual void OnPostCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, CmdResult result, const std::string &original_line)
+ virtual void OnPostCommand(const std::string &command, const std::vector<std::string> &parameters, User *user, CmdResult result, const std::string &original_line)
{
if ((NoisyOverride) && (OverriddenMode) && (irc::string(command.c_str()) == "MODE") && (result == CMD_SUCCESS))
{
diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp
index 82bd87a56..524bbcc0f 100644
--- a/src/modules/m_safelist.cpp
+++ b/src/modules/m_safelist.cpp
@@ -69,7 +69,7 @@ class ModuleSafeList : public Module
* OnPreCommand()
* Intercept the LIST command.
*/
- 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 the command doesnt appear to be valid, we dont want to mess with it. */
if (!validated)
@@ -77,7 +77,7 @@ class ModuleSafeList : public Module
if (command == "LIST")
{
- return this->HandleList(parameters, pcnt, user);
+ return this->HandleList(parameters, user);
}
return 0;
}
@@ -86,8 +86,9 @@ class ModuleSafeList : public Module
* HandleList()
* Handle (override) the LIST command.
*/
- int HandleList(const char* const* parameters, int pcnt, User* user)
+ int HandleList(const std::vector<std::string> &parameters, User* user)
{
+ int pcnt = parameters.size();
int minusers = 0, maxusers = 0;
if (global_listing >= LimitList && !IS_OPER(user))
@@ -111,15 +112,15 @@ class ModuleSafeList : public Module
/* Work around mIRC suckyness. YOU SUCK, KHALED! */
if (pcnt == 1)
{
- if (*parameters[0] == '<')
+ if (*parameters[0].c_str() == '<')
{
- maxusers = atoi(parameters[0]+1);
+ maxusers = atoi(parameters[0].c_str()+1);
ServerInstance->Logs->Log("m_safelist",DEBUG,"Max users: %d", maxusers);
pcnt = 0;
}
- else if (*parameters[0] == '>')
+ else if (*parameters[0].c_str() == '>')
{
- minusers = atoi(parameters[0]+1);
+ minusers = atoi(parameters[0].c_str()+1);
ServerInstance->Logs->Log("m_safelist",DEBUG,"Min users: %d", minusers);
pcnt = 0;
}
diff --git a/src/modules/m_securelist.cpp b/src/modules/m_securelist.cpp
index 829a6514a..1f9ac15e9 100644
--- a/src/modules/m_securelist.cpp
+++ b/src/modules/m_securelist.cpp
@@ -54,7 +54,7 @@ class ModuleSecureList : public Module
* OnPreCommand()
* Intercept the LIST command.
*/
- 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 the command doesnt appear to be valid, we dont want to mess with it. */
if (!validated)