summaryrefslogtreecommitdiff
path: root/plugins
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
parent9341f4d93b29229f7321745db9f384ba4269f342 (diff)
SeenPlugin: Make delimiter change backwards compatible (fixes #607)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/SeenPlugin/src/options.cpp2
-rw-r--r--plugins/SeenPlugin/src/utils.cpp11
-rw-r--r--plugins/SeenPlugin/src/version.h2
3 files changed, 12 insertions, 3 deletions
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 <stdver.h>