1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 00:43:12 +02:00

Be more explicit about what versions compatibility code is for.

This commit is contained in:
Sadie Powell
2025-05-09 21:42:53 +01:00
parent 5d648f9f1c
commit 07f57b1108
5 changed files with 15 additions and 10 deletions
+5 -2
View File
@@ -123,7 +123,7 @@ Serializable *NickCore::Type::Unserialize(Serializable *obj, Serialize::Data &da
Extensible::ExtensibleUnserialize(nc, nc, data);
/* compat */
// Begin 1.9 compatibility.
bool b;
b = false;
data["extensible:PRIVATE"] >> b;
@@ -153,7 +153,10 @@ Serializable *NickCore::Type::Unserialize(Serializable *obj, Serialize::Data &da
data["extensible:KILLPROTECT"] >> b;
if (b)
nc->Extend<bool>("PROTECT");
// End 1.9 compatibility
// Begin 2.0 compatibility.
b = false;
data["KILLPROTECT"] >> b;
if (b)
@@ -175,7 +178,7 @@ Serializable *NickCore::Type::Unserialize(Serializable *obj, Serialize::Data &da
nc->Extend<bool>("PROTECT");
nc->Extend("PROTECT_AFTER", 0);
}
/* end compat */
// End 2.0 compatibility.
return nc;
}