diff options
author | Adam <Adam@anope.org> | 2011-01-08 00:52:46 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-01-08 00:52:46 -0500 |
commit | ddeff725447f75906f09068a5ff91c3562364f48 (patch) | |
tree | b1981246d19eafdbbb88b7db613461975dab6e1b /modules/extra/db_mysql_live.cpp | |
parent | 43995b4c6d37b96bfbb7be04471508d59b66683d (diff) |
Process flag changes from SQL
Diffstat (limited to 'modules/extra/db_mysql_live.cpp')
-rw-r--r-- | modules/extra/db_mysql_live.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/extra/db_mysql_live.cpp b/modules/extra/db_mysql_live.cpp index a7bc1609c..ebf6a67c9 100644 --- a/modules/extra/db_mysql_live.cpp +++ b/modules/extra/db_mysql_live.cpp @@ -185,7 +185,8 @@ class MySQLLiveModule : public Module, public Pipe ci->successor = findcore(res.Get(0, "successor")); ci->desc = res.Get(0, "descr"); ci->time_registered = convertTo<time_t>(res.Get(0, "time_registered")); - // XXX flags, we need ChannelInfo::ProcessFlags or similar? + ci->ClearFlags(); + ci->FromString(BuildStringVector(res.Get(0, "flags"))); ci->forbidby = res.Get(0, "forbidby"); ci->forbidreason = res.Get(0, "forbidreason"); ci->bantype = convertTo<int>(res.Get(0, "bantype")); @@ -274,7 +275,8 @@ class MySQLLiveModule : public Module, public Pipe na->last_usermask = res.Get(0, "last_usermask"); na->time_registered = convertTo<time_t>(res.Get(0, "time_registered")); na->last_seen = convertTo<time_t>(res.Get(0, "last_seen")); - // XXX flags + na->ClearFlags(); + na->FromString(BuildStringVector(res.Get(0, "flags"))); if (na->nc != nc) { @@ -312,7 +314,8 @@ class MySQLLiveModule : public Module, public Pipe nc->pass = res.Get(0, "pass"); nc->email = res.Get(0, "email"); nc->greet = res.Get(0, "greet"); - // flags + nc->ClearFlags(); + nc->FromString(BuildStringVector(res.Get(0, "flags"))); nc->language = res.Get(0, "language"); } catch (const SQLException &) { } |