summaryrefslogtreecommitdiff
path: root/modules/extra/db_mysql.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-12-27 01:35:08 -0500
committerAdam <Adam@anope.org>2010-12-27 01:35:08 -0500
commita1c635b050534280c87145d8ebcc61b296d54afe (patch)
tree3a6442b37b1028d8e2e49cb2271ce8a677cb2d60 /modules/extra/db_mysql.cpp
parentd896bf9a1cb1d875fa6930380fc001c76fc44b48 (diff)
Load session exceptions on start when using SQL
Diffstat (limited to 'modules/extra/db_mysql.cpp')
-rw-r--r--modules/extra/db_mysql.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/extra/db_mysql.cpp b/modules/extra/db_mysql.cpp
index 6f2fcd832..d11d7b914 100644
--- a/modules/extra/db_mysql.cpp
+++ b/modules/extra/db_mysql.cpp
@@ -906,6 +906,18 @@ class DBMySQL : public Module
}
}
+ r = SQL->RunQuery("SELECT * FROM `anope_os_exceptions`");
+ for (int i = 0; i < r.Rows(); ++i)
+ {
+ Anope::string mask = r.Get(i, "mask");
+ unsigned limit = convertTo<unsigned>(r.Get(i, "slimit"));
+ Anope::string creator = r.Get(i, "who");
+ Anope::string reason = r.Get(i, "reason");
+ time_t expires = convertTo<time_t>(r.Get(i, "expires"));
+
+ exception_add(NULL, mask, limit, reason, creator, expires);
+ }
+
r = SQL->RunQuery("SELECT * FROM `anope_extra`");
for (int i = 0; i < r.Rows(); ++i)
{