From 4c3b947ddacabef2754f8ee9551c6be0786b73ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Wed, 14 Jun 2017 23:35:51 +0200 Subject: SeenPlugin: Make delimiter change backwards compatible (fixes #607) --- plugins/SeenPlugin/src/utils.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'plugins/SeenPlugin/src/utils.cpp') 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; -- cgit v1.2.3