diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-09 00:08:16 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-09 00:08:16 +0000 |
commit | 7b0568e9d134e7aea9ea39f75b91ac36c487466b (patch) | |
tree | 28f1e7a65478c574bf69a1daf689edc1e75cc88b /src/cmd_eline.cpp | |
parent | e68c10bb71182fc190eda5b4a305dce97eaa1be2 (diff) |
More cleanup, moved Om and myself to core team
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3567 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_eline.cpp')
-rw-r--r-- | src/cmd_eline.cpp | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/src/cmd_eline.cpp b/src/cmd_eline.cpp index 48c856dd3..b7b49472c 100644 --- a/src/cmd_eline.cpp +++ b/src/cmd_eline.cpp @@ -48,33 +48,36 @@ extern std::vector<ircd_module*> factory; void cmd_eline::Handle (char **parameters, int pcnt, userrec *user) { - if (pcnt >= 3) - { + if (pcnt >= 3) + { if (host_matches_everyone(parameters[0],user)) return; - add_eline(duration(parameters[1]),user->nick,parameters[2],parameters[0]); + + add_eline(duration(parameters[1]),user->nick,parameters[2],parameters[0]); FOREACH_MOD(I_OnAddELine,OnAddELine(duration(parameters[1]), user, parameters[2], parameters[0])); - if (!duration(parameters[1])) - { - WriteOpers("*** %s added permenant E-line for %s.",user->nick,parameters[0]); - } - else - { - WriteOpers("*** %s added timed E-line for %s, expires in %d seconds.",user->nick,parameters[0],duration(parameters[1])); - } - } - else - { - if (del_eline(parameters[0])) - { + + if (!duration(parameters[1])) + { + WriteOpers("*** %s added permenant E-line for %s.",user->nick,parameters[0]); + } + else + { + WriteOpers("*** %s added timed E-line for %s, expires in %d seconds.",user->nick,parameters[0],duration(parameters[1])); + } + } + else + { + if (del_eline(parameters[0])) + { FOREACH_MOD(I_OnDelELine,OnDelELine(user, parameters[0])); - WriteOpers("*** %s Removed E-line on %s.",user->nick,parameters[0]); - } - else - { - WriteServ(user->fd,"NOTICE %s :*** E-Line %s not found in list, try /stats e.",user->nick,parameters[0]); - } - } + WriteOpers("*** %s Removed E-line on %s.",user->nick,parameters[0]); + } + else + { + WriteServ(user->fd,"NOTICE %s :*** E-Line %s not found in list, try /stats e.",user->nick,parameters[0]); + } + } + // no need to apply the lines for an eline } |