summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-04 23:57:02 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-04 23:57:02 +0000
commit8e89fe75f9467969bce1dc6930befc6ef273edf6 (patch)
tree90cdb604fc2c10f4e1da661943a92c553acb4e31 /src
parent5fa533dcf77b71b467b32c86632d0b7004128bf8 (diff)
converting m_d* done
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9623 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_dccallow.cpp18
-rw-r--r--src/modules/m_delayjoin.cpp4
-rw-r--r--src/modules/m_devoice.cpp6
3 files changed, 14 insertions, 14 deletions
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp
index 747616bc0..abcad9de9 100644
--- a/src/modules/m_dccallow.cpp
+++ b/src/modules/m_dccallow.cpp
@@ -54,29 +54,29 @@ class CommandDccallow : public Command
/* XXX we need to fix this so it can work with translation stuff (i.e. move +- into a seperate param */
}
- CmdResult Handle(const char* const* parameters, int pcnt, User *user)
+ CmdResult Handle(const std::vector<std::string> &parameters, User *user)
{
/* syntax: DCCALLOW [+|-]<nick> (<time>) */
- if (!pcnt)
+ if (!parameters.size())
{
// display current DCCALLOW list
DisplayDCCAllowList(user);
return CMD_FAILURE;
}
- else if (pcnt > 0)
+ else if (parameters.size() > 0)
{
- char action = *parameters[0];
+ char action = *parameters[0].c_str();
// if they didn't specify an action, this is probably a command
if (action != '+' && action != '-')
{
- if (!strcasecmp(parameters[0], "LIST"))
+ if (!strcasecmp(parameters[0].c_str(), "LIST"))
{
// list current DCCALLOW list
DisplayDCCAllowList(user);
return CMD_FAILURE;
}
- else if (!strcasecmp(parameters[0], "HELP"))
+ else if (!strcasecmp(parameters[0].c_str(), "HELP"))
{
// display help
DisplayHelp(user);
@@ -84,7 +84,7 @@ class CommandDccallow : public Command
}
}
- std::string nick = parameters[0] + 1;
+ std::string nick = parameters[0].substr(1);
User *target = ServerInstance->FindNick(nick);
if (target)
@@ -150,11 +150,11 @@ class CommandDccallow : public Command
std::string default_length = Conf->ReadValue("dccallow", "length", 0);
long length;
- if (pcnt < 2)
+ if (parameters.size() < 2)
{
length = ServerInstance->Duration(default_length);
}
- else if (!atoi(parameters[1]))
+ else if (!atoi(parameters[1].c_str()))
{
length = 0;
}
diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp
index bb96b4617..2ce31be50 100644
--- a/src/modules/m_delayjoin.cpp
+++ b/src/modules/m_delayjoin.cpp
@@ -146,14 +146,14 @@ class ModuleDelayJoin : public Module
void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
{
Command* parthandler = ServerInstance->Parser->GetHandler("PART");
- const char* parameters[2];
+ std::vector<std::string> parameters;
if (parthandler && user->GetExt("delayjoin"))
{
for (UCListIter f = user->chans.begin(); f != user->chans.end(); f++)
{
parameters[0] = f->first->name;
/* This triggers our OnUserPart, above, making the PART silent */
- parthandler->Handle(parameters, 1, user);
+ parthandler->Handle(parameters, user);
}
}
}
diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp
index ac6156b65..75335885e 100644
--- a/src/modules/m_devoice.cpp
+++ b/src/modules/m_devoice.cpp
@@ -32,17 +32,17 @@ class CommandDevoice : public Command
TRANSLATE2(TR_TEXT, TR_END);
}
- CmdResult Handle (const char* const* parameters, int pcnt, User *user)
+ CmdResult Handle (const std::vector<std::string> &parameters, User *user)
{
Channel* c = ServerInstance->FindChan(parameters[0]);
if (c && c->HasUser(user))
{
- const char* modes[3];
+ std::vector<std::string> modes;
modes[0] = parameters[0];
modes[1] = "-v";
modes[2] = user->nick;
- ServerInstance->SendMode(modes, 3, ServerInstance->FakeClient);
+ ServerInstance->SendMode(modes, ServerInstance->FakeClient);
/* route it -- SendMode doesn't distribute over the whole network */
return CMD_SUCCESS;