summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/fakeuser.h4
-rw-r--r--src/users.cpp14
2 files changed, 16 insertions, 2 deletions
diff --git a/include/fakeuser.h b/include/fakeuser.h
index efdb5bd3d..60e645d65 100644
--- a/include/fakeuser.h
+++ b/include/fakeuser.h
@@ -24,8 +24,8 @@ class CoreExport FakeUser : public User
SetFd(FD_FAKEUSER_NUMBER);
}
- virtual const std::string GetFullHost() { return nick; }
- virtual const std::string GetFullRealHost() { return nick; }
+ virtual const std::string GetFullHost();
+ virtual const std::string GetFullRealHost();
void SetFakeServer(std::string name);
};
diff --git a/src/users.cpp b/src/users.cpp
index 9c295caad..5e27469e9 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -2051,6 +2051,20 @@ void FakeUser::SetFakeServer(std::string name)
this->server = nick.c_str();
}
+const std::string FakeUser::GetFullHost()
+{
+ if (ServerInstance->Config->HideWhoisServer)
+ return ServerInstance->Config->HideWhoisServer;
+ return nick;
+}
+
+const std::string FakeUser::GetFullRealHost()
+{
+ if (ServerInstance->Config->HideWhoisServer)
+ return ServerInstance->Config->HideWhoisServer;
+ return nick;
+}
+
VisData::VisData()
{
}