summaryrefslogtreecommitdiff
path: root/src/modules/m_cban.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-22 01:03:32 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-22 01:03:32 +0000
commitfb49fe0dac1d9c3591ae5b695ad6b2a2f79b6b67 (patch)
tree96a24143dea043100f0b0342a0981ff890085a61 /src/modules/m_cban.cpp
parentd8a073bda0d070cb7fbc8f8e83f17c235312eaf2 (diff)
Another commit, just because I can :P
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2613 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_cban.cpp')
-rw-r--r--src/modules/m_cban.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp
index f05641121..b8b3e6ee1 100644
--- a/src/modules/m_cban.cpp
+++ b/src/modules/m_cban.cpp
@@ -25,6 +25,7 @@ using namespace std;
/* $ModDesc: Gives /cban, aka C:lines. Think Q:lines, for channels. */
Server *Srv;
+vector<CBan> cbans;
class CBan
{
@@ -57,6 +58,9 @@ class CBan
class cmd_cban : public command_t
{
+ private:
+ Server *Srv;
+
public:
cmd_cban () : command_t("CBAN", 'o', 1)
{
@@ -68,6 +72,10 @@ class cmd_cban : public command_t
/* syntax: CBAN #channel time :reason goes here */
/* 'time' is a human-readable timestring, like 2d3h2s. */
+ std::string chname;
+ std::string reason;
+ unsigned long expiry;
+
if (pcnt == 1)
{
/* form: CBAN #channel removes a CBAN */
@@ -75,6 +83,13 @@ class cmd_cban : public command_t
else if (pcnt >= 2)
{
/* full form to add a CBAN */
+ /* XXX - checking on chnames */
+ chname = parameters[0];
+ expiry = TIME + Srv->Duration(parameters[1]);
+ reason = parameters[2];
+
+ CBan meow(chname, reason, expiry);
+ cbans.push_back(meow)
}
}
};
@@ -82,7 +97,6 @@ class cmd_cban : public command_t
class ModuleCBan : public Module
{
cmd_cban* mycommand;
- vector<CBan> cbans;
public:
ModuleCBan(Server* Me) : Module::Module(Me)