summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_std.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-04-13 10:22:07 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-04-13 10:22:07 +0000
commit1b5eef0a02ae4f33c0a9e5dc31e5dc11ff525710 (patch)
tree75c1594a983d75459e8c337ea82381584a059659 /protocols/JabberG/src/jabber_std.cpp
parent3269e1db8b4365187485d600cb2ebdda4894996a (diff)
old junk removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@16635 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_std.cpp')
-rw-r--r--protocols/JabberG/src/jabber_std.cpp56
1 files changed, 0 insertions, 56 deletions
diff --git a/protocols/JabberG/src/jabber_std.cpp b/protocols/JabberG/src/jabber_std.cpp
index ccf6ef694e..1a50492923 100644
--- a/protocols/JabberG/src/jabber_std.cpp
+++ b/protocols/JabberG/src/jabber_std.cpp
@@ -31,59 +31,3 @@ void CJabberProto::JLoginFailed(int errorCode)
m_savedPassword = NULL;
ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, errorCode);
}
-
-// save/load crypted strings
-void __forceinline sttCryptString(char *str)
-{
- for (;*str; ++str) {
- const char c = *str ^ 0xc3;
- if (c) *str = c;
- }
-}
-
-static TCHAR* JSetStringCrypt(LPCSTR szModule, MCONTACT hContact, char *valueName)
-{
- DBVARIANT dbv;
- if (db_get_s(hContact, szModule, valueName, &dbv))
- return NULL;
-
- sttCryptString(dbv.pszVal);
- WCHAR *res = mir_utf8decodeW(dbv.pszVal);
- db_free(&dbv);
- return res;
-}
-
-void CJabberProto::ConvertPasswords()
-{
- ptrT passw(JSetStringCrypt(m_szModuleName, NULL, "LoginPassword"));
- if (passw == NULL)
- return;
-
- setTString("Password", passw);
- delSetting("LoginPassword");
-
- for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- if ((passw = JSetStringCrypt(m_szModuleName, hContact, "LoginPassword")) == NULL)
- continue;
-
- setTString(hContact, "Password", passw);
- delSetting(hContact, "LoginPassword");
- }
-
- for (int i = 0;; i++) {
- char varName[100];
- mir_snprintf(varName, "rcMuc_%d_server", i);
- ptrA str(getStringA(NULL, varName));
- if (str == NULL)
- break;
-
- mir_snprintf(varName, "rcMuc_%d", i);
- passw = JSetStringCrypt(m_szModuleName, NULL, varName);
- if (passw != NULL) {
- delSetting(varName);
-
- mir_snprintf(varName, "password_rcMuc_%d", i);
- setTString(varName, passw);
- }
- }
-} \ No newline at end of file