From 816cdd3c089b0fd997b13f469ef1470ea25e53aa Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 8 Sep 2006 16:37:28 +0000 Subject: Sensible failure messages for cmd_qline git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5171 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_qline.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/cmd_qline.cpp b/src/cmd_qline.cpp index a76302421..3c1b8e363 100644 --- a/src/cmd_qline.cpp +++ b/src/cmd_qline.cpp @@ -33,6 +33,13 @@ CmdResult cmd_qline::Handle (const char** parameters, int pcnt, userrec *user) { if (ServerInstance->NickMatchesEveryone(parameters[0],user)) return CMD_FAILURE; + + if (strchr(parameters[0],'@') || strchr(parameters[0],'!') || strchr(parameters[0],'.')) + { + user->WriteServ("NOTICE %s :*** A Q-Line only bans a nick pattern, not a nick!user@host pattern.",user->nick); + return CMD_FAILURE; + } + ServerInstance->XLines->add_qline(ServerInstance->Duration(parameters[1]),user->nick,parameters[2],parameters[0]); FOREACH_MOD(I_OnAddQLine,OnAddQLine(ServerInstance->Duration(parameters[1]), user, parameters[2], parameters[0])); if (!ServerInstance->Duration(parameters[1])) -- cgit v1.2.3