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/options.cpp | 2 +- plugins/SeenPlugin/src/utils.cpp | 11 ++++++++++- plugins/SeenPlugin/src/version.h | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'plugins/SeenPlugin') diff --git a/plugins/SeenPlugin/src/options.cpp b/plugins/SeenPlugin/src/options.cpp index 0a3b89fa8a..bdbd8aa407 100644 --- a/plugins/SeenPlugin/src/options.cpp +++ b/plugins/SeenPlugin/src/options.cpp @@ -382,7 +382,7 @@ INT_PTR CALLBACK OptsSettingsDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM } hItem = TreeView_GetNextSibling(hwndTreeView, hItem); } - db_set_s(NULL, S_MOD, "WatchedProtocols", watchedProtocols); + db_set_s(NULL, S_MOD, "WatchedAccounts", watchedProtocols); UnloadWatchedProtos(); LoadWatchedProtos(); 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; diff --git a/plugins/SeenPlugin/src/version.h b/plugins/SeenPlugin/src/version.h index 2a861ded2a..fd178c711b 100644 --- a/plugins/SeenPlugin/src/version.h +++ b/plugins/SeenPlugin/src/version.h @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define __MAJOR_VERSION 5 #define __MINOR_VERSION 0 #define __RELEASE_NUM 5 -#define __BUILD_NUM 2 +#define __BUILD_NUM 3 #include -- cgit v1.2.3