aboutsummaryrefslogtreecommitdiff
path: root/src/serializable.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-12-14 15:48:57 +0000
committerGravatar Sadie Powell2021-12-14 15:48:57 +0000
commit64340dc50901f88336d9a2933dad98b462b6f36b (patch)
treee3512ff37a0ae8dd1b2c87a54382e6cf5325f49f /src/serializable.cpp
parentAdd a build time check that OpenLDAP is reentrant. (diff)
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.
Diffstat (limited to 'src/serializable.cpp')
-rw-r--r--src/serializable.cpp6
1 files changed, 5 insertions, 1 deletions
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<ModeParser::MODEID_MAX>(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;