diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-04 22:44:03 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-04 22:44:03 +0000 |
commit | 098f92e10024350022fd61d10bf64d75d071dc38 (patch) | |
tree | c8df88076e89df537c784457b88a7a7b3252238a /src | |
parent | e44c77aa89b0ff018645783172bcd84791c74c04 (diff) |
Convert a few more modules to new API and command handler.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9616 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_alltime.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_antibear.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_antibottler.cpp | 6 |
3 files changed, 7 insertions, 8 deletions
diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp index 525402541..d971daefc 100644 --- a/src/modules/m_alltime.cpp +++ b/src/modules/m_alltime.cpp @@ -25,7 +25,7 @@ class CommandAlltime : public Command translation.push_back(TR_END); } - CmdResult Handle(const char* const* parameters, int pcnt, User *user) + CmdResult Handle(const std::vector<std::string> ¶meters, User *user) { char fmtdate[64]; time_t now = ServerInstance->Time(); diff --git a/src/modules/m_antibear.cpp b/src/modules/m_antibear.cpp index 72eff0f9f..874ff43da 100644 --- a/src/modules/m_antibear.cpp +++ b/src/modules/m_antibear.cpp @@ -37,12 +37,11 @@ class ModuleAntiBear : public Module return Version(1,2,0,0,VF_VENDOR,API_VERSION); } - - 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> ¶meters, User *user, bool validated, const std::string &original_line) { - if (command == "NOTICE" && !validated && pcnt > 1 && user->GetExt("antibear_timewait")) + if (command == "NOTICE" && !validated && parameters.size() > 1 && user->GetExt("antibear_timewait")) { - if (!strncmp(parameters[1], "\1TIME Mon May 01 18:54:20 2006", 30)) + if (!strncmp(parameters[1].c_str(), "\1TIME Mon May 01 18:54:20 2006", 30)) { ZLine* zl = new ZLine(ServerInstance, ServerInstance->Time(), 86400, ServerInstance->Config->ServerName, "Unless you're stuck in a time warp, you appear to be a bear bot!", user->GetIPString()); diff --git a/src/modules/m_antibottler.cpp b/src/modules/m_antibottler.cpp index 9831730ef..d56ca7525 100644 --- a/src/modules/m_antibottler.cpp +++ b/src/modules/m_antibottler.cpp @@ -37,7 +37,7 @@ class ModuleAntiBottler : public Module return Version(1,2,0,1,VF_VENDOR,API_VERSION); } - 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> ¶meters, User *user, bool validated, const std::string &original_line) { char data[MAXBUF]; strlcpy(data,original_line.c_str(),MAXBUF); @@ -78,12 +78,12 @@ class ModuleAntiBottler : public Module if (!not_bottler) { std::string strgecos = std::string(gecos) + "[Possible bottler, ident: " + std::string(ident) + "]"; - const char* modified[4]; + std::vector<std::string> modified; modified[0] = "bottler"; modified[1] = local; modified[2] = remote; modified[3] = strgecos.c_str(); - ServerInstance->Parser->CallHandler("USER", modified, 4, user); + ServerInstance->Parser->CallHandler("USER", modified, user); return 1; } } |