From e3e3a35899931d98e76023464f9b077b09ba828d Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Mon, 19 Nov 2012 03:37:59 +0100 Subject: Add IS_SERVER() and REG_ALL checks to (mostly oper only) commands taking a target nickname If a SID was passed as the target user parameter or when it's an unregistered user reply with the "no such nick" (or the moral equivalent) message --- src/commands/cmd_eline.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/commands/cmd_eline.cpp') diff --git a/src/commands/cmd_eline.cpp b/src/commands/cmd_eline.cpp index 43eb678ee..ca39f9061 100644 --- a/src/commands/cmd_eline.cpp +++ b/src/commands/cmd_eline.cpp @@ -50,15 +50,15 @@ CmdResult CommandEline::Handle (const std::vector& parameters, User if (parameters.size() >= 3) { IdentHostPair ih; - User* find = ServerInstance->FindNick(target.c_str()); - if (find) + User* find = ServerInstance->FindNick(target); + if ((find) && (find->registered == REG_ALL)) { ih.first = "*"; ih.second = find->GetIPString(); target = std::string("*@") + find->GetIPString(); } else - ih = ServerInstance->XLines->IdentSplit(target.c_str()); + ih = ServerInstance->XLines->IdentSplit(target); if (ih.first.empty()) { -- cgit v1.2.3