From 945a5587598a3ceb86d83b3ab3c154691995acba Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 10 Nov 2007 15:43:20 +0000 Subject: Allow eline/gline/kline/zline by nick git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8553 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands/cmd_kline.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/commands/cmd_kline.cpp') diff --git a/src/commands/cmd_kline.cpp b/src/commands/cmd_kline.cpp index 7058de77f..49880fceb 100644 --- a/src/commands/cmd_kline.cpp +++ b/src/commands/cmd_kline.cpp @@ -6,7 +6,7 @@ * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see - * the file COPYING for details. + * the file COPYING for details. * * --------------------------------------------------- */ @@ -26,7 +26,16 @@ CmdResult CommandKline::Handle (const char** parameters, int pcnt, User *user) { if (pcnt >= 3) { - IdentHostPair ih = ServerInstance->XLines->IdentSplit(parameters[0]); + IdentHostPair ih; + User* find = ServerInstance->FindNick(parameters[0]); + if (find) + { + ih.first = "*"; + ih.second = find->GetIPString(); + } + else + ih = ServerInstance->XLines->IdentSplit(parameters[0]); + if (ServerInstance->HostMatchesEveryone(ih.first+"@"+ih.second,user)) return CMD_FAILURE; -- cgit v1.2.3