From 6dd331262aa8f989657891e27b8891ee6a00016c Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 13 May 2009 05:27:39 +0000 Subject: Create subclass of User for FakeClient, to allow for use as command source git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11375 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 3 +-- src/users.cpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index f3662cb31..b8eced5f4 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -609,8 +609,7 @@ InspIRCd::InspIRCd(int argc, char** argv) } /* set up fake client again this time with the correct uid */ - this->FakeClient = new User(this, "#INVALID"); - this->FakeClient->SetFd(FD_MAGIC_NUMBER); + this->FakeClient = new FakeUser(this); // Get XLine to do it's thing. this->XLines->CheckELines(); diff --git a/src/users.cpp b/src/users.cpp index 15e1ab72b..9574dd415 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -330,7 +330,7 @@ void User::CloseSocket() } } -const std::string& User::GetFullHost() +const std::string User::GetFullHost() { if (!this->cached_fullhost.empty()) return this->cached_fullhost; @@ -379,7 +379,7 @@ int User::ReadData(void* buffer, size_t size) } -const std::string& User::GetFullRealHost() +const std::string User::GetFullRealHost() { if (!this->cached_fullrealhost.empty()) return this->cached_fullrealhost; -- cgit v1.2.3