summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-05-13 17:43:35 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-05-13 17:43:35 +0000
commit98cb5d73ee686acff62e1969df0807e7ab3e3ade (patch)
tree7ea1cbe415f26e8c85cbcb8f7f103e4101176af4
parent46ecb9252891c472c1f34fb6a2b5fb7ffeef3793 (diff)
Hide server sources if HideWhoisServer is set, noticed by Brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11381 e03df62e-2008-0410-955e-edbf42e46eb7
-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()
{
}