diff options
| author | Adam <Adam@anope.org> | 2011-09-03 01:10:12 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2011-09-10 02:06:29 -0400 |
| commit | 1478b5bbd7ecc99c3ceefc0396845ebb0608d331 (patch) | |
| tree | 24783150322c7774643e22f4b3074764dab0736e /modules/database | |
| parent | 19e0b87aa1f41c3aabf6afc87ecdc8517dd47af0 (diff) | |
Added chanserv/log
Diffstat (limited to 'modules/database')
| -rw-r--r-- | modules/database/db_plain.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/database/db_plain.cpp b/modules/database/db_plain.cpp index dfcddfcfe..fffa02c87 100644 --- a/modules/database/db_plain.cpp +++ b/modules/database/db_plain.cpp @@ -561,6 +561,20 @@ class DBPlain : public Module ak->SetFlag(AK_ISNICK); } + else if (key.equals_ci("LOG")) + { + LogSetting l; + + l.service_name = params[0]; + l.command_service = params[1]; + l.command_name = params[2]; + l.method = params[3]; + l.creator = params[4]; + l.created = params[5].is_pos_number_only() ? convertTo<time_t>(params[5]) : Anope::CurTime; + l.extra = params.size() > 6 ? params[6] : ""; + + ci->log_settings.push_back(l); + } else if (key.equals_ci("MLOCK")) { bool set = params[0] == "1" ? true : false; @@ -785,6 +799,12 @@ class DBPlain : public Module db_buffer << ci->GetAkick(k)->reason; db_buffer << endl; } + for (unsigned k = 0, end = ci->log_settings.size(); k < end; ++k) + { + LogSetting &l = ci->log_settings[k]; + + db_buffer << "MD LOG " << l.service_name << " " << l.command_service << " " << l.command_name << " " << l.method << " " << l.creator << " " << l.created << " " << l.extra << endl; + } { std::vector<Anope::string> mlocks; if (ci->GetExtRegular("db_mlock", mlocks)) |
