mirror of
https://github.com/anope/anope.git
synced 2026-06-26 09:56:38 +02:00
Load session exceptions on start when using SQL
(cherry picked from commit a1c635b050)
This commit is contained in:
@@ -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<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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user