From 8b8e4be17fb6a321b9261c567d312056f0b6ea74 Mon Sep 17 00:00:00 2001 From: GRMrGecko Date: Sat, 18 Feb 2012 09:13:05 -0600 Subject: [PATCH] Added DoNotTrack command which makes it so you can have a connection on your phone and tell LogSQL to not track when that session disconnects so once you get on your computer, you can re-read everything. --- logmysql.cpp | 28 ++++++++++++++++++++++++++-- logsqlite.cpp | 28 ++++++++++++++++++++++++++-- 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/logmysql.cpp b/logmysql.cpp index a287262..9e1984f 100755 --- a/logmysql.cpp +++ b/logmysql.cpp @@ -41,9 +41,12 @@ public: AddCommand("ReplayAll", static_cast(&CLogMySQL::ReplayAllCommand), "[1|0]", "Replay all messages stored."); AddCommand("LogLimit", static_cast(&CLogMySQL::LogLimitCommand), "[0-9]+", "Limit the amount of items to store into the log."); AddCommand("LogLevel", static_cast(&CLogMySQL::LogLevelCommand), "[0-4]", "Log level."); + AddCommand("AddIgnore", static_cast(&CLogMySQL::AddIgnoreCommand), "Type[nick|chan] Target", "Add to ignore list."); AddCommand("RemoveIgnore", static_cast(&CLogMySQL::RemoveIgnoreCommand), "Type[nick|chan] Target", "Remove from ignore list."); AddCommand("IgnoreList", static_cast(&CLogMySQL::IgnoreListCommand), "", "View what is currently ignored."); + + AddCommand("DoNotTrack", static_cast(&CLogMySQL::DoNotTrack), "", "Adds the current session to the do not track disconnect list."); } void HostCommand(const CString &sLine) { @@ -282,6 +285,18 @@ public: } } + void DoNotTrack(const CString &sLine) { + bool tracking = true; + for (vector::iterator it=doNotTrackClient.begin(); itIsUserAttached()) { - SetSetting("clientDisconnected",GetUNIXTime()); + bool track = true; + for (vector::iterator it=doNotTrackClient.begin(); it nickIgnoreList; vector chanIgnoreList; + + vector doNotTrackClient; }; template<> void TModInfo(CModInfo& Info) { diff --git a/logsqlite.cpp b/logsqlite.cpp index c01bab3..cd2ee71 100755 --- a/logsqlite.cpp +++ b/logsqlite.cpp @@ -34,9 +34,12 @@ public: AddCommand("ReplayAll", static_cast(&CLogSQLite::ReplayAllCommand), "[1|0]", "Replay all messages stored."); AddCommand("LogLimit", static_cast(&CLogSQLite::LogLimitCommand), "[0-9]+", "Limit the amount of items to store into the log."); AddCommand("LogLevel", static_cast(&CLogSQLite::LogLevelCommand), "[0-4]", "Log level."); + AddCommand("AddIgnore", static_cast(&CLogSQLite::AddIgnoreCommand), "Type[nick|chan] Target", "Add to ignore list."); AddCommand("RemoveIgnore", static_cast(&CLogSQLite::RemoveIgnoreCommand), "Type[nick|chan] Target", "Remove from ignore list."); AddCommand("IgnoreList", static_cast(&CLogSQLite::IgnoreListCommand), "", "View what is currently ignored."); + + AddCommand("DoNotTrack", static_cast(&CLogSQLite::DoNotTrack), "", "Adds the current session to the do not track disconnect list."); } void ReplayCommand(const CString &sLine) { @@ -195,6 +198,18 @@ public: } } + void DoNotTrack(const CString &sLine) { + bool tracking = true; + for (vector::iterator it=doNotTrackClient.begin(); itIsUserAttached()) { - SetSetting("clientDisconnected",GetUNIXTime()); + bool track = true; + for (vector::iterator it=doNotTrackClient.begin(); it nickIgnoreList; vector chanIgnoreList; + + vector doNotTrackClient; }; template<> void TModInfo(CModInfo& Info) {