From 57185ec037c9af9905c8291dd86f3552100f41d6 Mon Sep 17 00:00:00 2001 From: w00t Date: Thu, 22 Dec 2005 00:14:38 +0000 Subject: Getting closer... git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2610 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_cban.cpp | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index ff2d142a0..40ad9e090 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -26,9 +26,38 @@ using namespace std; Server *Srv; +class CBan +{ + private: + unsigned long expiry; + std::string chname; + std::string reason; + + public: + CBan(std::string chname, std::string reason, unsigned long expiry) + { + + } + + std::string GetName() + { + return chname; + } + + std::string GetReason() + { + return reason; + } + + unsigned long GetExpiry() + { + return expiry; + } +} + class cmd_cban : public command_t { - public: + public: cmd_cban () : command_t("CBAN", 'o', 1) { this->source = "m_cban.so"; @@ -53,7 +82,7 @@ class cmd_cban : public command_t class ModuleCBan : public Module { cmd_cban* mycommand; - vector cbans; + vector cbans; public: ModuleCBan(Server* Me) : Module::Module(Me) @@ -69,9 +98,9 @@ class ModuleCBan : public Module std::string chname = cname; - for (vector::iterator iterate = cbans.begin(); iterate < cbans.end(); iterate++) + for (vector::iterator iterate = cbans.begin(); iterate < cbans.end(); iterate++) { - if (chname == *iterate) + if (chname == *iterate->GetName()) { /* matches CBAN */ return 1; -- cgit v1.2.3