From c8b3809fc93bfcccb354248c17467da9b69e0ebd Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 22 Oct 2011 11:21:21 -0400 Subject: Added akill ids --- modules/database/db_old.cpp | 24 ++++++++++++------------ modules/database/db_plain.cpp | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'modules/database') 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 ¶ms) time_t expires = params[6].is_pos_number_only() ? convertTo(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; } } -- cgit