aboutsummaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
authorGravatar brain2005-04-04 17:55:48 +0000
committerGravatar brain2005-04-04 17:55:48 +0000
commitb54f879f3539c298646449ede2e8d458fc305605 (patch)
tree69b852c9896b8efb214a2a208efeb825cf56c2c9 /src/commands.cpp
parentAdded m_operlevels, prevents opers designated as above other opers from being... (diff)
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
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp33
1 files changed, 33 insertions, 0 deletions
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];