From 19a144728864302fada40db3f6efc452653d5bdc Mon Sep 17 00:00:00 2001 From: Gunter Labes Date: Thu, 17 Sep 2009 05:03:24 +0000 Subject: [PATCH] don't check for the IP for simple usernames in searchlog... ...since we can have several entries with the same username now; also made sl an alias for searchlog --- src/server/server.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/server/server.cpp b/src/server/server.cpp index dd276302f6e..6df42652cc7 100644 --- a/src/server/server.cpp +++ b/src/server/server.cpp @@ -1582,7 +1582,7 @@ std::string server::process_command(std::string query, std::string issuer_name) } motd_ = parameters; out << "Message of the day set to: " << motd_; - } else if (command == "searchlog") { + } else if (command == "searchlog" || command == "sl") { if (parameters.empty()) { return "You must enter a mask to search for."; } @@ -1590,22 +1590,6 @@ std::string server::process_command(std::string query, std::string issuer_name) bool found_something = false; - // If a simple username is given we'll check for its IP instead. - if (utils::isvalid_username(parameters)) { - for (std::deque::const_iterator i = ip_log_.begin(); - i != ip_log_.end(); ++i) { - if (parameters == i->nick) { - parameters = i->ip; - found_something = true; - break; - } - } - if (!found_something) { - out << "\nNo match found."; - return out.str(); - } - } - // If this looks like an IP look up which nicks have been connected from it // Otherwise look for the last IP the nick used to connect const bool match_ip = (std::count(parameters.begin(), parameters.end(), '.') >= 1);