From b54f879f3539c298646449ede2e8d458fc305605 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 4 Apr 2005 17:55:48 +0000 Subject: Added E:Lines, a form of ban exception that can prevent opers, netadmins etc from being glined. Can be added and removed either in the config or by an oper with the correct permissions to use the /ELINE command git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@975 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/commands.cpp') diff --git a/src/commands.cpp b/src/commands.cpp index 75f0dd86d..2ae4e0049 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1293,6 +1293,11 @@ void handle_stats(char **parameters, int pcnt, userrec *user) stats_z(user); } + if (!strcmp(parameters[0],"e")) + { + stats_e(user); + } + /* stats m (list number of times each command has been used, plus bytecount) */ if (!strcmp(parameters[0],"m")) { @@ -3160,6 +3165,34 @@ void handle_kline(char **parameters, int pcnt, userrec *user) apply_lines(); } +void handle_eline(char **parameters, int pcnt, userrec *user) +{ + if (pcnt >= 3) + { + add_eline(duration(parameters[1]),user->nick,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])) + { + 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 +} + void handle_gline(char **parameters, int pcnt, userrec *user) { char netdata[MAXBUF]; -- cgit v1.3.1-10-gc9f91