summaryrefslogtreecommitdiff
path: root/plugins/SeenPlugin/src/options.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-09-27 20:41:06 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-09-27 20:41:11 +0300
commitb2f4da66f2affc8a53f79eef2a74cf447c8b0db8 (patch)
tree264aa8ed10526892839cb18238f34e400e402091 /plugins/SeenPlugin/src/options.cpp
parenta39926c9f33f53fe57492ed4960d817a9c95d3e6 (diff)
SeenPlugin: old ugly schema of storing protocol settings replaced with more convenient one
Diffstat (limited to 'plugins/SeenPlugin/src/options.cpp')
-rw-r--r--plugins/SeenPlugin/src/options.cpp15
1 files changed, 2 insertions, 13 deletions
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;
}