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

Fix loading ttb from databases

This commit is contained in:
Adam
2013-03-30 22:40:20 -05:00
parent d23817604c
commit 111d6a9178
+12
View File
@@ -480,6 +480,18 @@ Serializable* ChannelInfo::Unserialize(Serializable *obj, Serialize::Data &data)
if (ci->bi)
ci->bi->Assign(NULL, ci);
}
{
Anope::string ttb, tok;
data["ttb"] >> ttb;
spacesepstream sep(ttb);
for (int i = 0; sep.GetToken(tok) && i < TTB_SIZE; ++i)
try
{
ci->ttb[i] = convertTo<int16_t>(tok);
}
catch (const ConvertException &) { }
}
data["capsmin"] >> ci->capsmin;
data["capspercent"] >> ci->capspercent;
data["floodlines"] >> ci->floodlines;