From 49dd1c34096623e916f6e5aba44f7036738c3344 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 27 Dec 2010 00:42:38 -0500 Subject: Bug #1220 - Fixed an event in /hs activate and /ms del --- modules/extra/db_mysql.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/extra/db_mysql.cpp') diff --git a/modules/extra/db_mysql.cpp b/modules/extra/db_mysql.cpp index 3cc0ceacb..6f2fcd832 100644 --- a/modules/extra/db_mysql.cpp +++ b/modules/extra/db_mysql.cpp @@ -1371,7 +1371,7 @@ class DBMySQL : public Module this->Escape(m->sender) + "', '" + this->Escape(m->text) + "', 'CHAN')"); } - void OnMemoDel(NickCore *nc, MemoInfo *mi, Memo *m) + void OnMemoDel(const NickCore *nc, MemoInfo *mi, Memo *m) { if (m) this->RunQuery("DELETE FROM `anope_ms_info` WHERE `receiver` = '" + this->Escape(nc->display) + "' AND `time` = " + stringify(m->time)); -- cgit From a1c635b050534280c87145d8ebcc61b296d54afe Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 27 Dec 2010 01:35:08 -0500 Subject: Load session exceptions on start when using SQL --- modules/extra/db_mysql.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'modules/extra/db_mysql.cpp') 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(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) { -- cgit