diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-05 17:39:36 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-06-05 17:39:36 +0000 |
commit | c2993f666f8146e75b4039b2b7bffe3455a3ac61 (patch) | |
tree | 9672e7a956f241696a337acf9973309c4c2b1e16 /src/cmd_zline.cpp | |
parent | d2717df5ef65c00bb43e1b775c7846af1625848a (diff) |
Sexeger!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7241 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_zline.cpp')
-rw-r--r-- | src/cmd_zline.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cmd_zline.cpp b/src/cmd_zline.cpp index 1f8076a77..443647208 100644 --- a/src/cmd_zline.cpp +++ b/src/cmd_zline.cpp @@ -38,19 +38,20 @@ CmdResult cmd_zline::Handle (const char** parameters, int pcnt, userrec *user) if (ServerInstance->IPMatchesEveryone(parameters[0],user)) return CMD_FAILURE; - if (ServerInstance->XLines->add_zline(ServerInstance->Duration(parameters[1]),user->nick,parameters[2],parameters[0])) + 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(ServerInstance->Duration(parameters[1]), user, parameters[2], parameters[0])); - if (!ServerInstance->Duration(parameters[1])) + 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 { - 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 Z-line for %s, expires on %s",user->nick,parameters[0], ServerInstance->TimeString(c_requires_crap).c_str()); } |