aboutsummaryrefslogtreecommitdiffstats
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar Peter Powell2019-05-13 17:24:25 +0100
committerGravatar Peter Powell2019-10-14 11:03:03 +0100
commitd0f802e30c492cb1b7e55f51063bfd38b29931c6 (patch)
treea11cbb5c48fae151d285e0536d4f51b2b09659da /src/users.cpp
parentAdd GetTypeStr to the DNS API. (diff)
downloadinspircd++-d0f802e30c492cb1b7e55f51063bfd38b29931c6.tar.gz
inspircd++-d0f802e30c492cb1b7e55f51063bfd38b29931c6.tar.bz2
inspircd++-d0f802e30c492cb1b7e55f51063bfd38b29931c6.zip
Implement serialisation of users.
This allows for various things which will be coming in the future. e.g. Transferring users to another server on upgrade.
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/users.cpp b/src/users.cpp
index b8a2d31a8..01bad8b61 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -112,6 +112,15 @@ LocalUser::LocalUser(int myfd, irc::sockets::sockaddrs* client, irc::sockets::so
ChangeRealHost(GetIPString(), true);
}
+LocalUser::LocalUser(int myfd, const std::string& uuid, Serializable::Data& data)
+ : User(uuid, ServerInstance->FakeClient->server, USERTYPE_LOCAL)
+ , eh(this)
+ , already_sent(0)
+{
+ eh.SetFd(myfd);
+ Deserialize(data);
+}
+
User::~User()
{
}