diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-08 16:37:28 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-08 16:37:28 +0000 |
commit | 816cdd3c089b0fd997b13f469ef1470ea25e53aa (patch) | |
tree | f6a3b8e1d1572c405ee4c780ec29ebfeb1302f0c /src | |
parent | 5dd1410631a3b70ac6f5de99156b4e3d86936ae5 (diff) |
Sensible failure messages for cmd_qline
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5171 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd_qline.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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])) |