summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cmd_gline.cpp5
-rw-r--r--src/cmd_kline.cpp5
-rw-r--r--src/cmd_zline.cpp4
3 files changed, 12 insertions, 2 deletions
diff --git a/src/cmd_gline.cpp b/src/cmd_gline.cpp
index b5e361e82..39118c369 100644
--- a/src/cmd_gline.cpp
+++ b/src/cmd_gline.cpp
@@ -36,6 +36,11 @@ CmdResult cmd_gline::Handle (const char** parameters, int pcnt, userrec *user)
user->WriteServ("NOTICE %s :*** G-Line must contain a username, e.g. *@%s",user->nick,parameters[0]);
return CMD_FAILURE;
}
+ else if (strchr(parameters[0],'!'))
+ {
+ user->WriteServ("NOTICE %s :*** G-Line cannot contain a nickname!",user->nick);
+ return CMD_FAILURE;
+ }
if (ServerInstance->XLines->add_gline(ServerInstance->Duration(parameters[1]),user->nick,parameters[2],parameters[0]))
{
diff --git a/src/cmd_kline.cpp b/src/cmd_kline.cpp
index de1cb8366..3d81ecf4d 100644
--- a/src/cmd_kline.cpp
+++ b/src/cmd_kline.cpp
@@ -36,6 +36,11 @@ CmdResult cmd_kline::Handle (const char** parameters, int pcnt, userrec *user)
user->WriteServ("NOTICE %s :*** K-Line must contain a username, e.g. *@%s",user->nick,parameters[0]);
return CMD_FAILURE;
}
+ else if (strchr(parameters[0],'!'))
+ {
+ user->WriteServ("NOTICE %s :*** K-Line cannot contain a nickname!",user->nick);
+ return CMD_FAILURE;
+ }
if (ServerInstance->XLines->add_kline(ServerInstance->Duration(parameters[1]),user->nick,parameters[2],parameters[0]))
{
diff --git a/src/cmd_zline.cpp b/src/cmd_zline.cpp
index 46d24f3bd..f2b14c5ba 100644
--- a/src/cmd_zline.cpp
+++ b/src/cmd_zline.cpp
@@ -29,9 +29,9 @@ CmdResult cmd_zline::Handle (const char** parameters, int pcnt, userrec *user)
{
if (pcnt >= 3)
{
- if (strchr(parameters[0],'@'))
+ if (strchr(parameters[0],'@') || strchr(parameters[0],'!'))
{
- user->WriteServ("NOTICE %s :*** You cannot include a username in a zline, a zline must ban only an IP mask",user->nick);
+ user->WriteServ("NOTICE %s :*** You cannot include a username or nickname in a zline, a zline must ban only an IP mask",user->nick);
return CMD_FAILURE;
}