summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-22 07:10:13 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-22 07:10:13 +0000
commitafa25930c07831ce0c42515324f698846b817772 (patch)
treedf13ea43c5d32a326e057d796289fc321b6217d0
parentdda690a5ac6ade0b52c0c33320de16477a51f9e4 (diff)
Added debugging. Let's fix this sucker >:/
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2615 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_cban.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp
index 66abbfc22..a133626de 100644
--- a/src/modules/m_cban.cpp
+++ b/src/modules/m_cban.cpp
@@ -88,7 +88,8 @@ class cmd_cban : public command_t
/* full form to add a CBAN */
/* XXX - checking on chnames */
chname = parameters[0];
- expiry = TIME + Srv->CalcDuration(parameters[1]);
+ expiry = 0;
+//TIME + Srv->CalcDuration(parameters[1]);
reason = parameters[2];
CBan meow(chname, reason, expiry);
@@ -109,7 +110,7 @@ class ModuleCBan : public Module
Srv->AddCommand(mycommand);
}
- virtual int OnUserPreJoin (userrec *user, chanrec *chan, const char *cname)
+ virtual int OnUserPreJoin(userrec *user, chanrec *chan, const char *cname)
{
/* check cbans in here, and apply as necessary. */
@@ -117,13 +118,17 @@ class ModuleCBan : public Module
for (unsigned int a = 0; a < cbans.size(); a++)
{
+ WriteOpers("m_cban: DEBUG: checking %s against %s in OnPreUserJoin()", chname, cbans[a].GetName());
if (chname == cbans[a].GetName())
{
/* matches CBAN */
+ WriteOpers("DENY join");
return 1;
}
}
+ WriteOpers("DONE checking, allowed");
+
/* Allow the change. */
return 0;
}