summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-10-22 21:53:24 +0100
committerPeter Powell <petpow@saberuk.com>2017-10-28 16:16:10 +0100
commitd865b434865907bfad0a187dd403d4ca8144e469 (patch)
tree4c36b1028ab02ca8ac2d07b867819f96f38c2745 /src/modules/m_spanningtree
parent08f6f056667df63d1673bea959c73b75393113c6 (diff)
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.
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/opertype.cpp2
-rw-r--r--src/modules/m_spanningtree/uid.cpp8
2 files changed, 5 insertions, 5 deletions
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<std::string>&
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::vector<std::st
RemoteUser* _new = new SpanningTree::RemoteUser(params[0], remoteserver);
ServerInstance->Users->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);