diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-11-19 03:37:59 +0100 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-12-15 19:47:40 +0100 |
commit | e3e3a35899931d98e76023464f9b077b09ba828d (patch) | |
tree | 5a4dbe8907a2bd25e1ac5a72ca5a182efdae7041 /src/commands/cmd_gline.cpp | |
parent | 71d53e4883cdb83b50f43cd934ac9b4cd2b95383 (diff) |
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
Diffstat (limited to 'src/commands/cmd_gline.cpp')
-rw-r--r-- | src/commands/cmd_gline.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/cmd_gline.cpp b/src/commands/cmd_gline.cpp index 430256be8..6505b7464 100644 --- a/src/commands/cmd_gline.cpp +++ b/src/commands/cmd_gline.cpp @@ -51,15 +51,15 @@ CmdResult CommandGline::Handle (const std::vector<std::string>& 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()) { |