summaryrefslogtreecommitdiff
path: root/plugins/SeenPlugin/src/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SeenPlugin/src/utils.cpp')
-rw-r--r--plugins/SeenPlugin/src/utils.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp
index 302dfa1dbd..cff0c704de 100644
--- a/plugins/SeenPlugin/src/utils.cpp
+++ b/plugins/SeenPlugin/src/utils.cpp
@@ -28,7 +28,16 @@ char *courProtoName = 0;
void LoadWatchedProtos()
{
- ptrA szProtos(db_get_sa(NULL, S_MOD, "WatchedProtocols"));
+ // Upgrade from old settings (separated by " ")
+ ptrA szProtosOld(db_get_sa(NULL, S_MOD, "WatchedProtocols"));
+ if (szProtosOld != NULL) {
+ CMStringA tmp(szProtosOld);
+ tmp.Replace(" ", "\n");
+ db_set_s(NULL, S_MOD, "WatchedAccounts", tmp.c_str());
+ db_unset(NULL, S_MOD, "WatchedProtocols");
+ }
+
+ ptrA szProtos(db_get_sa(NULL, S_MOD, "WatchedAccounts"));
if (szProtos == NULL)
return;