summaryrefslogtreecommitdiff
path: root/src/cmd_qline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd_qline.cpp')
-rw-r--r--src/cmd_qline.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd_qline.cpp b/src/cmd_qline.cpp
index aa8933580..383f27756 100644
--- a/src/cmd_qline.cpp
+++ b/src/cmd_qline.cpp
@@ -38,19 +38,19 @@ CmdResult cmd_qline::Handle (const char** parameters, int pcnt, userrec *user)
return CMD_FAILURE;
}
- if (ServerInstance->XLines->add_qline(ServerInstance->Duration(parameters[1]),user->nick,parameters[2],parameters[0]))
+ 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(ServerInstance->Duration(parameters[1]), user, parameters[2], parameters[0]));
- if (!ServerInstance->Duration(parameters[1]))
+ 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
{
- time_t c_requires_crap = ServerInstance->Duration(parameters[1]) + ServerInstance->Time();
+ time_t c_requires_crap = duration + ServerInstance->Time();
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());
}