From b2f4da66f2affc8a53f79eef2a74cf447c8b0db8 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 27 Sep 2024 20:41:06 +0300 Subject: SeenPlugin: old ugly schema of storing protocol settings replaced with more convenient one --- plugins/SeenPlugin/src/options.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'plugins/SeenPlugin/src/options.cpp') diff --git a/plugins/SeenPlugin/src/options.cpp b/plugins/SeenPlugin/src/options.cpp index 765fedb421..e3e2ef05b5 100644 --- a/plugins/SeenPlugin/src/options.cpp +++ b/plugins/SeenPlugin/src/options.cpp @@ -342,22 +342,11 @@ public: g_plugin.setByte("IdleSupport", IsDlgButtonChecked(m_hwnd, IDC_IDLESUPPORT)); // save protocol list - CMStringA watchedProtocols; - int nItems = protocols.GetItemCount(); - for (int i=0; i < nItems; i++) { - if (!protocols.GetCheckState(i)) - continue; - + for (int i = 0; i < nItems; i++) { char *szProto = (char *)protocols.GetItemData(i); - if (!watchedProtocols.IsEmpty()) - watchedProtocols.AppendChar('\n'); - watchedProtocols.Append(szProto); + db_set_b(0, szProto, MODULENAME "Enabled", protocols.GetCheckState(i)); } - g_plugin.setString("WatchedAccounts", watchedProtocols); - - UnloadWatchedProtos(); - LoadWatchedProtos(); return true; } -- cgit v1.2.3