From 098f92e10024350022fd61d10bf64d75d071dc38 Mon Sep 17 00:00:00 2001 From: peavey Date: Sun, 4 May 2008 22:44:03 +0000 Subject: 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 --- src/modules/m_antibear.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/modules/m_antibear.cpp') 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 ¶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()); -- cgit v1.3.1-10-gc9f91