summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cmd_eline.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/cmd_eline.cpp b/src/cmd_eline.cpp
index df2455f86..1abe0ca4f 100644
--- a/src/cmd_eline.cpp
+++ b/src/cmd_eline.cpp
@@ -37,16 +37,18 @@ CmdResult cmd_eline::Handle (const char** parameters, int pcnt, userrec *user)
return CMD_FAILURE;
}
- ServerInstance->XLines->add_eline(ServerInstance->Duration(parameters[1]),user->nick,parameters[2],parameters[0]);
- FOREACH_MOD(I_OnAddELine,OnAddELine(ServerInstance->Duration(parameters[1]), user, parameters[2], parameters[0]));
-
- if (!ServerInstance->Duration(parameters[1]))
+ if (ServerInstance->XLines->add_eline(ServerInstance->Duration(parameters[1]),user->nick,parameters[2],parameters[0]))
{
- ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent E-line for %s.",user->nick,parameters[0]);
- }
- else
- {
- ServerInstance->SNO->WriteToSnoMask('x',"%s added timed E-line for %s, expires in %d seconds.",user->nick,parameters[0],ServerInstance->Duration(parameters[1]));
+ FOREACH_MOD(I_OnAddELine,OnAddELine(ServerInstance->Duration(parameters[1]), user, parameters[2], parameters[0]));
+
+ if (!ServerInstance->Duration(parameters[1]))
+ {
+ ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent E-line for %s.",user->nick,parameters[0]);
+ }
+ else
+ {
+ ServerInstance->SNO->WriteToSnoMask('x',"%s added timed E-line for %s, expires in %d seconds.",user->nick,parameters[0],ServerInstance->Duration(parameters[1]));
+ }
}
}
else