summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-22 00:14:38 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-22 00:14:38 +0000
commit57185ec037c9af9905c8291dd86f3552100f41d6 (patch)
treed64fb31fa594faea33044e9b6541462dadca16e5
parentea7aa89d61f5090ee7e7ecbe9eb633e1189ce40a (diff)
Getting closer...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2610 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_cban.cpp37
1 files 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<std::string> cbans;
+ vector<CBan> cbans;
public:
ModuleCBan(Server* Me) : Module::Module(Me)
@@ -69,9 +98,9 @@ class ModuleCBan : public Module
std::string chname = cname;
- for (vector<std::string>::iterator iterate = cbans.begin(); iterate < cbans.end(); iterate++)
+ for (vector<CBan>::iterator iterate = cbans.begin(); iterate < cbans.end(); iterate++)
{
- if (chname == *iterate)
+ if (chname == *iterate->GetName())
{
/* matches CBAN */
return 1;