summaryrefslogtreecommitdiff
path: root/plugins/SeenPlugin/src/utils.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2017-06-14 23:35:51 +0200
committerRobert Pösel <robyer@seznam.cz>2017-06-14 23:35:51 +0200
commit4c3b947ddacabef2754f8ee9551c6be0786b73ba (patch)
tree9417fba4cbeb414acbe7a9cd2f36cdf0c3a8c67f /plugins/SeenPlugin/src/utils.cpp
parent9341f4d93b29229f7321745db9f384ba4269f342 (diff)
SeenPlugin: Make delimiter change backwards compatible (fixes #607)
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;