X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_who.cpp;h=362e79c03c8e540df8170e0609d9f616790c0c20;hb=33180223e318c304892b3fa8640f90f1ddf6f4b4;hp=4757375c77b0750b8d1fe78d515501e994f3b9bc;hpb=227484c6c068eee8251cc4f13a0676bd8b2ecc8d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_who.cpp b/src/coremods/core_who.cpp index 4757375c7..362e79c03 100644 --- a/src/coremods/core_who.cpp +++ b/src/coremods/core_who.cpp @@ -56,7 +56,7 @@ struct WhoData // A user specified label for the WHOX response. std::string whox_querytype; - WhoData(const std::vector& parameters) + WhoData(const CommandBase::Params& parameters) : whox(false) { // Find the matchtext and swap the 0 for a * so we can use InspIRCd::Match on it. @@ -168,7 +168,7 @@ class CommandWho : public SplitCommand /** Sends a WHO reply to a user. */ void SendWhoLine(LocalUser* user, const std::vector& parameters, Membership* memb, User* u, WhoData& data); - CmdResult HandleLocal(const std::vector& parameters, LocalUser* user) CXX11_OVERRIDE; + CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE; }; template<> User* CommandWho::GetUser(UserManager::OperList::const_iterator& t) { return *t; } @@ -304,7 +304,7 @@ bool CommandWho::MatchUser(LocalUser* source, User* user, WhoData& data) // The source wants to match against users' real names. else if (data.flags['r']) - match = InspIRCd::Match(user->fullname, data.matchtext, ascii_case_insensitive_map); + match = InspIRCd::Match(user->GetRealName(), data.matchtext, ascii_case_insensitive_map); else if (data.flags['s']) { @@ -340,13 +340,12 @@ bool CommandWho::MatchUser(LocalUser* source, User* user, WhoData& data) } if (!match) - match = InspIRCd::Match(user->fullname, data.matchtext, ascii_case_insensitive_map); + match = InspIRCd::Match(user->GetRealName(), data.matchtext, ascii_case_insensitive_map); if (!match) match = InspIRCd::Match(user->nick, data.matchtext); } - ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "MATCH: %u", match); return match; } @@ -485,7 +484,7 @@ void CommandWho::SendWhoLine(LocalUser* source, const std::vector& // Include the user's real name. if (data.whox_fields['r']) - wholine.push(user->fullname); + wholine.push(user->GetRealName()); } else { @@ -531,7 +530,7 @@ void CommandWho::SendWhoLine(LocalUser* source, const std::vector& // Include the number of hops between the users and the user's real name. wholine.push("0 "); - wholine.GetParams().back().append(user->fullname); + wholine.GetParams().back().append(user->GetRealName()); } ModResult res; @@ -540,7 +539,7 @@ void CommandWho::SendWhoLine(LocalUser* source, const std::vector& data.results.push_back(wholine); } -CmdResult CommandWho::HandleLocal(const std::vector& parameters, LocalUser* user) +CmdResult CommandWho::HandleLocal(LocalUser* user, const Params& parameters) { WhoData data(parameters);