summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-16 17:03:11 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-16 17:03:11 +0000
commite0a572b920c2805afb3954773264994eed36bf1a (patch)
tree2bcaa94dbe5df322060e229fd07729d5461dc4e2 /src
parent4ac62d7e3335e4ca5c8c77e343e172abeb0a38a1 (diff)
Check in eline, gline and kline for the @ which signifies an ident. Without the ident, these are malformed
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4929 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/cmd_eline.cpp14
-rw-r--r--src/cmd_gline.cpp14
-rw-r--r--src/cmd_kline.cpp14
3 files changed, 30 insertions, 12 deletions
diff --git a/src/cmd_eline.cpp b/src/cmd_eline.cpp
index 6ee43d16f..27cad8c21 100644
--- a/src/cmd_eline.cpp
+++ b/src/cmd_eline.cpp
@@ -3,13 +3,13 @@
* +------------------------------------+
*
* InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- * E-mail:
- * <brain@chatspike.net>
- * <Craig@chatspike.net>
+ * E-mail:
+ * <brain@chatspike.net>
+ * <Craig@chatspike.net>
*
* Written by Craig Edwards, Craig McLure, and others.
* This program is free but copyrighted software; see
- * the file COPYING for details.
+ * the file COPYING for details.
*
* ---------------------------------------------------
*/
@@ -33,6 +33,12 @@ void cmd_eline::Handle (const char** parameters, int pcnt, userrec *user)
if (ServerInstance->HostMatchesEveryone(parameters[0],user))
return;
+ if (!strchr(parameters[0],'@'))
+ {
+ user->WriteServ("NOTICE %s :*** E-Line must contain a username, e.g. *@%s",user->nick,parameters[0]);
+ return;
+ }
+
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]));
diff --git a/src/cmd_gline.cpp b/src/cmd_gline.cpp
index eda52095b..b7c22c467 100644
--- a/src/cmd_gline.cpp
+++ b/src/cmd_gline.cpp
@@ -3,13 +3,13 @@
* +------------------------------------+
*
* InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- * E-mail:
- * <brain@chatspike.net>
- * <Craig@chatspike.net>
+ * E-mail:
+ * <brain@chatspike.net>
+ * <Craig@chatspike.net>
*
* Written by Craig Edwards, Craig McLure, and others.
* This program is free but copyrighted software; see
- * the file COPYING for details.
+ * the file COPYING for details.
*
* ---------------------------------------------------
*/
@@ -33,6 +33,12 @@ void cmd_gline::Handle (const char** parameters, int pcnt, userrec *user)
if (ServerInstance->HostMatchesEveryone(parameters[0],user))
return;
+ if (!strchr(parameters[0],'@'))
+ {
+ user->WriteServ("NOTICE %s :*** G-Line must contain a username, e.g. *@%s",user->nick,parameters[0]);
+ return;
+ }
+
ServerInstance->XLines->add_gline(ServerInstance->Duration(parameters[1]),user->nick,parameters[2],parameters[0]);
FOREACH_MOD(I_OnAddGLine,OnAddGLine(ServerInstance->Duration(parameters[1]), user, parameters[2], parameters[0]));
diff --git a/src/cmd_kline.cpp b/src/cmd_kline.cpp
index 02a928f11..52cbba26e 100644
--- a/src/cmd_kline.cpp
+++ b/src/cmd_kline.cpp
@@ -3,13 +3,13 @@
* +------------------------------------+
*
* InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- * E-mail:
- * <brain@chatspike.net>
- * <Craig@chatspike.net>
+ * E-mail:
+ * <brain@chatspike.net>
+ * <Craig@chatspike.net>
*
* Written by Craig Edwards, Craig McLure, and others.
* This program is free but copyrighted software; see
- * the file COPYING for details.
+ * the file COPYING for details.
*
* ---------------------------------------------------
*/
@@ -38,6 +38,12 @@ void cmd_kline::Handle (const char** parameters, int pcnt, userrec *user)
if (ServerInstance->HostMatchesEveryone(parameters[0],user))
return;
+ if (!strchr(parameters[0],'@'))
+ {
+ user->WriteServ("NOTICE %s :*** K-Line must contain a username, e.g. *@%s",user->nick,parameters[0]);
+ return;
+ }
+
ServerInstance->XLines->add_kline(ServerInstance->Duration(parameters[1]),user->nick,parameters[2],parameters[0]);
FOREACH_MOD(I_OnAddKLine,OnAddKLine(ServerInstance->Duration(parameters[1]), user, parameters[2], parameters[0]));