diff options
author | Adam <Adam@anope.org> | 2013-03-30 22:40:20 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-03-30 22:40:20 -0500 |
commit | 111d6a917806fd3ce2269436d08d68bd7eb1d5ea (patch) | |
tree | dcf350fb3f9a1fdc95ea3cceb37af166ff0fcace /src/regchannel.cpp | |
parent | d23817604c9593857dad2f3e3f42b74ece0d81e3 (diff) |
Fix loading ttb from databases
Diffstat (limited to 'src/regchannel.cpp')
-rw-r--r-- | src/regchannel.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp index bc7505761..a35fa5d4d 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -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; |