From e2eb0f327cf2086013d8534182b86f923ea98a7a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 3 Mar 2020 23:08:10 +0300 Subject: Jabber: code cleaning --- protocols/JabberG/src/jabber.cpp | 5 +++-- protocols/JabberG/src/jabber_caps.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'protocols') diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index 6dae866193..74d0cd32f1 100755 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -178,9 +178,10 @@ int CMPlugin::Load() HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); JabberUserInfoInit(); - if (db_get_b(0, "Compatibility", "JabberCaps", 0) < 2) { + if (db_get_b(0, "Compatibility", "JabberCaps", 0) < 3) { db_delete_module(0, "JabberCaps"); - db_set_b(0, "Compatibility", "JabberCaps", 2); + DeleteFileW(VARSW(L"%miranda_userdata%\\jabberCaps.json")); + db_set_b(0, "Compatibility", "JabberCaps", 3); } g_clientCapsManager.Load(); diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp index a9ab470973..a9db096b77 100755 --- a/protocols/JabberG/src/jabber_caps.cpp +++ b/protocols/JabberG/src/jabber_caps.cpp @@ -618,7 +618,7 @@ CJabberClientPartialCaps* CJabberClientCapsManager::SetClientCaps(const char *sz ///////////////////////////////////////////////////////////////////////////////////////// -static const char *str2buf(const std::string str) +static const char *str2buf(const std::string &str) { return (str.empty()) ? nullptr : str.c_str(); } -- cgit v1.2.3