summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/Changes1
-rw-r--r--modules/extra/db_mysql.cpp10
2 files changed, 6 insertions, 5 deletions
diff --git a/docs/Changes b/docs/Changes
index bbfcbed17..83f84e072 100644
--- a/docs/Changes
+++ b/docs/Changes
@@ -8,6 +8,7 @@ A Added support for Plexus 3
A Readded in support for /cs op/deop/etc to op/deop you in all channels
F Changed the GHOST command to not allow ghosting unidentified users if the RECOVER command exists
F Some failed logic in /operserv exception that prevents proper exceptions from being added
+F Fixed the anope_os_sxlines MySQL table and code to work after restarting
Anope Version 1.9.3
--------------------
diff --git a/modules/extra/db_mysql.cpp b/modules/extra/db_mysql.cpp
index 93f540be3..07135757c 100644
--- a/modules/extra/db_mysql.cpp
+++ b/modules/extra/db_mysql.cpp
@@ -890,15 +890,15 @@ class DBMySQL : public Module
Anope::string by = r.Get(i, "xby");
Anope::string reason = r.Get(i, "reason");
time_t seton = r.Get(i, "seton").is_pos_number_only() ? convertTo<time_t>(r.Get(i, "seton")) : Anope::CurTime;
- time_t expires = r.Get(i, "expires").is_pos_number_only() ? convertTo<time_t>(r.Get(i, "expires")) : Anope::CurTime;
+ time_t expires = r.Get(i, "expire").is_pos_number_only() ? convertTo<time_t>(r.Get(i, "expire")) : Anope::CurTime;
XLine *x = NULL;
if (SNLine && r.Get(i, "type").equals_cs("SNLINE"))
- SNLine->Add(NULL, NULL, mask, expires, reason);
+ x = SNLine->Add(NULL, NULL, mask, expires, reason);
else if (SQLine && r.Get(i, "type").equals_cs("SQLINE"))
- SQLine->Add(NULL, NULL, mask, expires, reason);
+ x = SQLine->Add(NULL, NULL, mask, expires, reason);
else if (SZLine && r.Get(i, "type").equals_cs("SZLINE"))
- SZLine->Add(NULL, NULL, mask, expires, reason);
+ x = SZLine->Add(NULL, NULL, mask, expires, reason);
if (x)
{
x->By = by;
@@ -1418,7 +1418,7 @@ class DBMySQL : public Module
EventReturn OnAddXLine(User *, XLine *x, XLineType Type)
{
- this->RunQuery(Anope::string("INSERT INTO `anope_os_sxlines` (type, mask, xby, reason, seton, expire) VALUES('") +
+ this->RunQuery(Anope::string("INSERT INTO `anope_os_xlines` (type, mask, xby, reason, seton, expire) VALUES('") +
(Type == X_SNLINE ? "SNLINE" : (Type == X_SQLINE ? "SQLINE" : "SZLINE")) + "', '" +
this->Escape(x->Mask) + "', '" + this->Escape(x->By) + "', '" + this->Escape(x->Reason) + "', " +
stringify(x->Created) + ", " + stringify(x->Expires) + ")");