summaryrefslogtreecommitdiff
path: root/src/cmd_kline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd_kline.cpp')
-rw-r--r--src/cmd_kline.cpp14
1 files changed, 10 insertions, 4 deletions
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]));