summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-28 18:33:06 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-28 18:33:06 +0000
commit4840d5e77572f42b710501912d59b5dbb6d2c2af (patch)
tree6ff11fbb04dd9a78ae9befdc66bcdb4ea03aa2a4 /src/commands
parentf35e50f35c0174973802721dc6aef980e2eb8196 (diff)
- Tear out a useless load of XLine clutters that did nothing much except confuse things
- Revert back to early 1.0 design of using a single list for line storage. We'll make this work more efficiently than 1.0 though of course. This simplifies the code for expiry, checking, etc. - Merge a bunch of sort callbacks into a single sort callback for class XLine. - Horribly break apply_lines() for the time being. .. and that's probably it. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8398 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/cmd_gline.cpp5
-rw-r--r--src/commands/cmd_kline.cpp5
-rw-r--r--src/commands/cmd_qline.cpp4
-rw-r--r--src/commands/cmd_zline.cpp5
4 files changed, 4 insertions, 15 deletions
diff --git a/src/commands/cmd_gline.cpp b/src/commands/cmd_gline.cpp
index 3845c23ee..411df7b14 100644
--- a/src/commands/cmd_gline.cpp
+++ b/src/commands/cmd_gline.cpp
@@ -44,14 +44,11 @@ CmdResult CommandGline::Handle (const char** parameters, int pcnt, User *user)
long duration = ServerInstance->Duration(parameters[1]);
if (ServerInstance->XLines->add_gline(duration,user->nick,parameters[2],parameters[0]))
{
- int to_apply = APPLY_GLINES;
-
FOREACH_MOD(I_OnAddGLine,OnAddGLine(duration, user, parameters[2], parameters[0]));
if (!duration)
{
ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent G-line for %s.",user->nick,parameters[0]);
- to_apply |= APPLY_PERM_ONLY;
}
else
{
@@ -60,7 +57,7 @@ CmdResult CommandGline::Handle (const char** parameters, int pcnt, User *user)
ServerInstance->TimeString(c_requires_crap).c_str());
}
- ServerInstance->XLines->apply_lines(to_apply);
+ ServerInstance->XLines->apply_lines();
}
else
{
diff --git a/src/commands/cmd_kline.cpp b/src/commands/cmd_kline.cpp
index 5edb414ea..521159790 100644
--- a/src/commands/cmd_kline.cpp
+++ b/src/commands/cmd_kline.cpp
@@ -44,14 +44,11 @@ CmdResult CommandKline::Handle (const char** parameters, int pcnt, User *user)
long duration = ServerInstance->Duration(parameters[1]);
if (ServerInstance->XLines->add_kline(duration,user->nick,parameters[2],parameters[0]))
{
- int to_apply = APPLY_KLINES;
-
FOREACH_MOD(I_OnAddKLine,OnAddKLine(duration, user, parameters[2], parameters[0]));
if (!duration)
{
ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent K-line for %s.",user->nick,parameters[0]);
- to_apply |= APPLY_PERM_ONLY;
}
else
{
@@ -60,7 +57,7 @@ CmdResult CommandKline::Handle (const char** parameters, int pcnt, User *user)
ServerInstance->TimeString(c_requires_crap).c_str());
}
- ServerInstance->XLines->apply_lines(to_apply);
+ ServerInstance->XLines->apply_lines();
}
else
{
diff --git a/src/commands/cmd_qline.cpp b/src/commands/cmd_qline.cpp
index 16927d234..01f99546b 100644
--- a/src/commands/cmd_qline.cpp
+++ b/src/commands/cmd_qline.cpp
@@ -38,11 +38,9 @@ CmdResult CommandQline::Handle (const char** parameters, int pcnt, User *user)
long duration = ServerInstance->Duration(parameters[1]);
if (ServerInstance->XLines->add_qline(duration,user->nick,parameters[2],parameters[0]))
{
- int to_apply = APPLY_QLINES;
FOREACH_MOD(I_OnAddQLine,OnAddQLine(duration, user, parameters[2], parameters[0]));
if (!duration)
{
- to_apply |= APPLY_PERM_ONLY;
ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent Q-line for %s.",user->nick,parameters[0]);
}
else
@@ -51,7 +49,7 @@ CmdResult CommandQline::Handle (const char** parameters, int pcnt, User *user)
ServerInstance->SNO->WriteToSnoMask('x',"%s added timed Q-line for %s, expires on %s",user->nick,parameters[0],
ServerInstance->TimeString(c_requires_crap).c_str());
}
- ServerInstance->XLines->apply_lines(to_apply);
+ ServerInstance->XLines->apply_lines();
}
else
{
diff --git a/src/commands/cmd_zline.cpp b/src/commands/cmd_zline.cpp
index d6394a7a3..7e5d9b7b2 100644
--- a/src/commands/cmd_zline.cpp
+++ b/src/commands/cmd_zline.cpp
@@ -38,12 +38,9 @@ CmdResult CommandZline::Handle (const char** parameters, int pcnt, User *user)
long duration = ServerInstance->Duration(parameters[1]);
if (ServerInstance->XLines->add_zline(duration,user->nick,parameters[2],parameters[0]))
{
- int to_apply = APPLY_ZLINES;
-
FOREACH_MOD(I_OnAddZLine,OnAddZLine(duration, user, parameters[2], parameters[0]));
if (!duration)
{
- to_apply |= APPLY_PERM_ONLY;
ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent Z-line for %s.",user->nick,parameters[0]);
}
else
@@ -52,7 +49,7 @@ CmdResult CommandZline::Handle (const char** parameters, int pcnt, User *user)
ServerInstance->SNO->WriteToSnoMask('x',"%s added timed Z-line for %s, expires on %s",user->nick,parameters[0],
ServerInstance->TimeString(c_requires_crap).c_str());
}
- ServerInstance->XLines->apply_lines(to_apply);
+ ServerInstance->XLines->apply_lines();
}
else
{