From e9f84a0db910ccf0cfdbcd7aa6de32c3a754b7ae Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 27 Dec 2010 01:35:08 -0500 Subject: [PATCH] Load session exceptions on start when using SQL (cherry picked from commit a1c635b050534280c87145d8ebcc61b296d54afe) --- modules/extra/db_mysql.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/extra/db_mysql.cpp b/modules/extra/db_mysql.cpp index 27d99190f..dbf0fc760 100644 --- a/modules/extra/db_mysql.cpp +++ b/modules/extra/db_mysql.cpp @@ -897,6 +897,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(r.Get(i, "slimit")); + Anope::string creator = r.Get(i, "who"); + Anope::string reason = r.Get(i, "reason"); + time_t expires = convertTo(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) {