diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-10 17:36:05 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-10 17:36:05 +0000 |
commit | b55d5722c581b43ebb854c8403ba25ba5411979f (patch) | |
tree | b4d35ea62a00991b7d456de8d526154e914bcb26 /src | |
parent | 425ab67e76483e6adc424adda3c5e7357c140743 (diff) |
Only send snotice if the eline doesnt exist yet
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6288 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd_eline.cpp | 20 |
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 |