summaryrefslogtreecommitdiff
path: root/src/regchannel.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-03-30 22:40:20 -0500
committerAdam <Adam@anope.org>2013-03-30 22:40:20 -0500
commit111d6a917806fd3ce2269436d08d68bd7eb1d5ea (patch)
treedcf350fb3f9a1fdc95ea3cceb37af166ff0fcace /src/regchannel.cpp
parentd23817604c9593857dad2f3e3f42b74ece0d81e3 (diff)
Fix loading ttb from databases
Diffstat (limited to 'src/regchannel.cpp')
-rw-r--r--src/regchannel.cpp12
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;