From d865b434865907bfad0a187dd403d4ca8144e469 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sun, 22 Oct 2017 21:53:24 +0100 Subject: Hide User#host and User#dhost and use accessors to modify them. This removes the need to invalidate the cache after changing a user's hostname. --- src/modules/m_spanningtree/opertype.cpp | 2 +- src/modules/m_spanningtree/uid.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules/m_spanningtree') diff --git a/src/modules/m_spanningtree/opertype.cpp b/src/modules/m_spanningtree/opertype.cpp index b1d0c327e..4b1dce23c 100644 --- a/src/modules/m_spanningtree/opertype.cpp +++ b/src/modules/m_spanningtree/opertype.cpp @@ -52,7 +52,7 @@ CmdResult CommandOpertype::HandleRemote(RemoteUser* u, std::vector& return CMD_SUCCESS; } - ServerInstance->SNO->WriteToSnoMask('O',"From %s: User %s (%s@%s) is now an IRC operator of type %s",u->server->GetName().c_str(), u->nick.c_str(),u->ident.c_str(), u->host.c_str(), opertype.c_str()); + ServerInstance->SNO->WriteToSnoMask('O',"From %s: User %s (%s@%s) is now an IRC operator of type %s",u->server->GetName().c_str(), u->nick.c_str(),u->ident.c_str(), u->GetRealHost().c_str(), opertype.c_str()); return CMD_SUCCESS; } diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index 2a17943e9..905061cc7 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -73,8 +73,8 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, std::vectorUsers->clientlist[params[2]] = _new; _new->nick = params[2]; - _new->host = params[3]; - _new->dhost = params[4]; + _new->ChangeRealHost(params[3], false); + _new->ChangeDisplayedHost(params[4]); _new->ident = params[5]; _new->fullname = params.back(); _new->registered = REG_ALL; @@ -157,8 +157,8 @@ CommandUID::Builder::Builder(User* user) push(user->uuid); push_int(user->age); push(user->nick); - push(user->host); - push(user->dhost); + push(user->GetRealHost()); + push(user->GetDisplayedHost()); push(user->ident); push(user->GetIPString()); push_int(user->signon); -- cgit v1.2.3