summaryrefslogtreecommitdiff
path: root/modules/database
diff options
context:
space:
mode:
Diffstat (limited to 'modules/database')
-rw-r--r--modules/database/db_old.cpp24
-rw-r--r--modules/database/db_plain.cpp6
2 files changed, 15 insertions, 15 deletions
diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp
index 55956da78..440713a6e 100644
--- a/modules/database/db_old.cpp
+++ b/modules/database/db_old.cpp
@@ -920,9 +920,9 @@ static void LoadOper()
if (!akill)
continue;
- XLine *x = akill->Add(user + "@" + host, by, expires, reason);
- if (x)
- x->Created = seton;
+ XLine *x = new XLine(user + "@" + host, by, expires, reason, XLineManager::GenerateUID());
+ x->Created = seton;
+ akill->AddXLine(x);
}
read_int16(&capacity, f); // SNLines
@@ -940,9 +940,9 @@ static void LoadOper()
if (!snline)
continue;
- XLine *x = snline->Add(mask, by, expires, reason);
- if (x)
- x->Created = seton;
+ XLine *x = new XLine(mask, by, expires, reason, XLineManager::GenerateUID());
+ x->Created = seton;
+ snline->AddXLine(x);
}
read_int16(&capacity, f); // SQLines
@@ -960,9 +960,9 @@ static void LoadOper()
if (!sqline)
continue;
- XLine *x = sqline->Add(mask, by, expires, reason);
- if (x)
- x->Created = seton;
+ XLine *x = new XLine(mask, by, expires, reason, XLineManager::GenerateUID());
+ x->Created = seton;
+ sqline->AddXLine(x);
}
read_int16(&capacity, f); // SZLines
@@ -980,9 +980,9 @@ static void LoadOper()
if (!szline)
continue;
- XLine *x = szline->Add(mask, by, expires, reason);
- if (x)
- x->Created = seton;
+ XLine *x = new XLine(mask, by, expires, reason, XLineManager::GenerateUID());
+ x->Created = seton;
+ szline->AddXLine(x);
}
close_db(f);
diff --git a/modules/database/db_plain.cpp b/modules/database/db_plain.cpp
index 4ac109018..3605c0b9d 100644
--- a/modules/database/db_plain.cpp
+++ b/modules/database/db_plain.cpp
@@ -548,9 +548,9 @@ static void LoadOperInfo(const std::vector<Anope::string> &params)
time_t expires = params[6].is_pos_number_only() ? convertTo<time_t>(params[6]) : 0;
Anope::string reason = params[7];
- XLine *x = xl->Add(mask, by, expires, reason);
- if (x)
- x->Created = seton;
+ XLine *x = new XLine(mask, by, expires, reason, XLineManager::GenerateUID());
+ x->Created = seton;
+ xl->AddXLine(x);
break;
}
}