diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-06-22 13:17:57 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-06-22 13:17:57 +0200 |
commit | b0eca1dbccdbe5ac22b96375011a5cf51a487c47 (patch) | |
tree | 5ce7ac775f158fc0addac757ac8949446af51583 | |
parent | 740769937e36a6961833b72f6c6a75a72ff5b3bf (diff) |
core_ison Don't deduplicate nicks
Deduplication makes us do pointless processing for every ISON and offers
no benefit at all to proper clients that send a nick only once
-rw-r--r-- | src/coremods/core_ison.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/coremods/core_ison.cpp b/src/coremods/core_ison.cpp index 1412db844..d127ed344 100644 --- a/src/coremods/core_ison.cpp +++ b/src/coremods/core_ison.cpp @@ -42,16 +42,12 @@ class CommandIson : public Command */ CmdResult CommandIson::Handle (const std::vector<std::string>& parameters, User *user) { - std::map<User*,User*> ison_already; User *u; std::string reply = "303 " + user->nick + " :"; for (unsigned int i = 0; i < parameters.size(); i++) { u = ServerInstance->FindNickOnly(parameters[i]); - if (ison_already.find(u) != ison_already.end()) - continue; - if ((u) && (u->registered == REG_ALL)) { reply.append(u->nick).append(" "); @@ -60,7 +56,6 @@ CmdResult CommandIson::Handle (const std::vector<std::string>& parameters, User user->WriteServ(reply); reply = "303 " + user->nick + " :"; } - ison_already[u] = u; } else { @@ -74,9 +69,6 @@ CmdResult CommandIson::Handle (const std::vector<std::string>& parameters, User while (list.GetToken(item)) { u = ServerInstance->FindNickOnly(item); - if (ison_already.find(u) != ison_already.end()) - continue; - if ((u) && (u->registered == REG_ALL)) { reply.append(u->nick).append(" "); @@ -85,7 +77,6 @@ CmdResult CommandIson::Handle (const std::vector<std::string>& parameters, User user->WriteServ(reply); reply = "303 " + user->nick + " :"; } - ison_already[u] = u; } } } |