summaryrefslogtreecommitdiff
path: root/src/modules/m_blockamsg.cpp
diff options
context:
space:
mode:
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-04 23:28:57 +0000
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-04 23:28:57 +0000
commitc2d1f2cdafb0a38446844f6bd3d683e8636e37b4 (patch)
treea9427eff9698f3b4921018de660c70b5ed40bba5 /src/modules/m_blockamsg.cpp
parent222e912fc3e4a09bba3d9aeef815b6c364c5c71c (diff)
Convert a whole bunch more
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9620 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_blockamsg.cpp')
-rw-r--r--src/modules/m_blockamsg.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp
index e4a4eaf4e..17aad007f 100644
--- a/src/modules/m_blockamsg.cpp
+++ b/src/modules/m_blockamsg.cpp
@@ -84,7 +84,7 @@ class ModuleBlockAmsg : public Module
action = IBLOCK_KILLOPERS;
}
- 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)
{
// Don't do anything with unregistered users, or remote ones.
if(!user || (user->registered != REG_ALL) || !IS_LOCAL(user))
@@ -94,7 +94,7 @@ class ModuleBlockAmsg : public Module
// Add std::string contructor for irc::string :x
irc::string cmd = command.c_str();
- if(validated && (cmd == "PRIVMSG" || cmd == "NOTICE") && (pcnt >= 2))
+ if(validated && (cmd == "PRIVMSG" || cmd == "NOTICE") && (parameters.size() >= 2))
{
// parameters[0] should have the target(s) in it.
// I think it will be faster to first check if there are any commas, and if there are then try and parse it out.
@@ -103,13 +103,13 @@ class ModuleBlockAmsg : public Module
int targets = 1;
int userchans = 0;
- if(*parameters[0] != '#')
+ if(*parameters[0].c_str() != '#')
{
// Decrement if the first target wasn't a channel.
targets--;
}
- for(const char* c = parameters[0]; *c; c++)
+ for(const char* c = parameters[0].c_str(); *c; c++)
if((*c == ',') && *(c+1) && (*(c+1) == '#'))
targets++;
@@ -151,12 +151,12 @@ class ModuleBlockAmsg : public Module
{
// If there's already a BlockedMessage allocated, use it.
m->message = parameters[1];
- m->target = parameters[0];
+ m->target = parameters[0].c_str();
m->sent = ServerInstance->Time();
}
else
{
- m = new BlockedMessage(parameters[1], parameters[0], ServerInstance->Time());
+ m = new BlockedMessage(parameters[1], parameters[0].c_str(), ServerInstance->Time());
user->Extend("amsgblock", (char*)m);
}
}