summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-13 18:58:26 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-13 18:58:26 +0000
commit1f6d7e0d9b04f7481b0af40fc7680926012c0b84 (patch)
tree7bcc8e69cf6f9d2cdacf3f6981915d1a7dd9640f
parentf5c4235bf63828a0b1a3d864614e985a27a217bd (diff)
Prevented zlines from being allowed with a username/ident in them
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2375 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/commands.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index cb9391280..55b95dc93 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -2037,6 +2037,11 @@ void handle_zline(char **parameters, int pcnt, userrec *user)
{
if (pcnt >= 3)
{
+ if (strchr(parameters[0],'@'))
+ {
+ WriteServ(user->fd,"NOTICE %s :*** You cannot include a username in a zline, a zline must ban only an IP mask",user->nick);
+ return;
+ }
if (ip_matches_everyone(parameters[0],user))
return;
add_zline(duration(parameters[1]),user->nick,parameters[2],parameters[0]);