summaryrefslogtreecommitdiff
path: root/src/cmd_gline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd_gline.cpp')
-rw-r--r--src/cmd_gline.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd_gline.cpp b/src/cmd_gline.cpp
index f2b3b02a6..b5e361e82 100644
--- a/src/cmd_gline.cpp
+++ b/src/cmd_gline.cpp
@@ -39,18 +39,21 @@ CmdResult cmd_gline::Handle (const char** parameters, int pcnt, userrec *user)
if (ServerInstance->XLines->add_gline(ServerInstance->Duration(parameters[1]),user->nick,parameters[2],parameters[0]))
{
+ int to_apply = APPLY_GLINES;
+
FOREACH_MOD(I_OnAddGLine,OnAddGLine(ServerInstance->Duration(parameters[1]), user, parameters[2], parameters[0]));
if (!ServerInstance->Duration(parameters[1]))
{
ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent G-line for %s.",user->nick,parameters[0]);
+ to_apply |= APPLY_PERM_ONLY;
}
else
{
ServerInstance->SNO->WriteToSnoMask('x',"%s added timed G-line for %s, expires in %d seconds.",user->nick,parameters[0],ServerInstance->Duration(parameters[1]));
}
- ServerInstance->XLines->apply_lines(APPLY_GLINES);
+ ServerInstance->XLines->apply_lines(to_apply);
}
else
{