From 64340dc50901f88336d9a2933dad98b462b6f36b Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 14 Dec 2021 15:48:57 +0000 Subject: Sync uniqueusername from the connect class to the user. This is a massive hack for now but should be made to sync properly in v4 when we have extensibles that don't suck. --- src/serializable.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/serializable.cpp') diff --git a/src/serializable.cpp b/src/serializable.cpp index b351d4099..13d94ef29 100644 --- a/src/serializable.cpp +++ b/src/serializable.cpp @@ -132,6 +132,7 @@ bool User::Deserialize(Serializable::Data& data) return false; long client_port; + bool user_uniqueusername; std::string client_addr; std::string user_modes; std::string user_oper; @@ -151,11 +152,13 @@ bool User::Deserialize(Serializable::Data& data) .Load("realhost", realhost) .Load("realname", realname) .Load("signon", signon) - .Load("snomasks", user_snomasks); + .Load("snomasks", user_snomasks) + .Load("uniqueusername", user_uniqueusername); // Apply the rest of the members. modes = std::bitset(user_modes); snomasks = std::bitset<64>(user_snomasks); + uniqueusername = user_uniqueusername; ServerConfig::OperIndex::const_iterator iter = ServerInstance->Config->OperTypes.find(user_oper); if (iter != ServerInstance->Config->OperTypes.end()) @@ -213,6 +216,7 @@ bool User::Serialize(Serializable::Data& data) .Store("realname", realname) .Store("signon", signon) .Store("snomasks", snomasks.to_string()) + .Store("uniqueusername", uniqueusername) .Store("uuid", uuid); return true; -- cgit v1.3.1-10-gc9f91