mirror of
https://github.com/anope/anope.git
synced 2026-07-08 08:23:15 +02:00
Be more explicit about what versions compatibility code is for.
This commit is contained in:
@@ -1169,7 +1169,7 @@ class CSSet final
|
||||
}
|
||||
else
|
||||
{
|
||||
// Begin 2.0 compatibility
|
||||
// Begin 2.0 compatibility.
|
||||
size_t c = modes.find(',');
|
||||
if (c == Anope::string::npos)
|
||||
ci->last_modes.emplace(modes, ModeData());
|
||||
|
||||
@@ -176,7 +176,7 @@ private:
|
||||
}
|
||||
else
|
||||
{
|
||||
// Begin 2.0 compatibility
|
||||
// Begin 2.0 compatibility.
|
||||
size_t c = modes.find(',');
|
||||
if (c == Anope::string::npos)
|
||||
nc->last_modes.emplace(modes, ModeData());
|
||||
|
||||
+4
-2
@@ -226,16 +226,18 @@ Serializable *NickAlias::Type::Unserialize(Serializable *obj, Serialize::Data &d
|
||||
|
||||
Extensible::ExtensibleUnserialize(na, na, data);
|
||||
|
||||
/* compat */
|
||||
// Begin 1.9 compatibility.
|
||||
bool b;
|
||||
b = false;
|
||||
data["extensible:NO_EXPIRE"] >> b;
|
||||
if (b)
|
||||
na->Extend<bool>("NS_NO_EXPIRE");
|
||||
// End 1.9 compatibility.
|
||||
|
||||
// Begin 2.0 compatibility.
|
||||
if (na->registered < na->nc->registered)
|
||||
na->nc->registered = na->registered;
|
||||
/* end compat */
|
||||
// End 2.0 compatibility.
|
||||
|
||||
return na;
|
||||
}
|
||||
|
||||
+5
-2
@@ -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;
|
||||
}
|
||||
|
||||
+4
-4
@@ -255,10 +255,10 @@ Serializable *ChannelInfo::Type::Unserialize(Serializable *obj, Serialize::Data
|
||||
spacesepstream(slevels).GetTokens(v);
|
||||
for (unsigned i = 0; i + 1 < v.size(); i += 2)
|
||||
{
|
||||
// Begin 2.0 database compatibility.
|
||||
// Begin 2.0 compatibility.
|
||||
if (v[i] == "FANTASIA")
|
||||
v[i] = "FANTASY";
|
||||
// End 2.0 database compatibility.
|
||||
// End 2.0 compatibility.
|
||||
if (auto level = Anope::TryConvert<int16_t>(v[i + 1]))
|
||||
ci->levels[v[i]] = level.value();
|
||||
}
|
||||
@@ -284,7 +284,7 @@ Serializable *ChannelInfo::Type::Unserialize(Serializable *obj, Serialize::Data
|
||||
|
||||
Extensible::ExtensibleUnserialize(ci, ci, data);
|
||||
|
||||
/* compat */
|
||||
// Begin 1.9 compatibility.
|
||||
bool b;
|
||||
b = false;
|
||||
data["extensible:PRIVATE"] >> b;
|
||||
@@ -326,7 +326,7 @@ Serializable *ChannelInfo::Type::Unserialize(Serializable *obj, Serialize::Data
|
||||
data["extensible:SIGNKICK_LEVEL"] >> b;
|
||||
if (b)
|
||||
ci->Extend<bool>("SIGNKICK_LEVEL");
|
||||
/* end compat */
|
||||
// End 1.9 compatibility.
|
||||
|
||||
return ci;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user