diff options
author | George Hazan <george.hazan@gmail.com> | 2016-04-13 10:22:07 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-04-13 10:22:07 +0000 |
commit | 1b5eef0a02ae4f33c0a9e5dc31e5dc11ff525710 (patch) | |
tree | 75c1594a983d75459e8c337ea82381584a059659 | |
parent | 3269e1db8b4365187485d600cb2ebdda4894996a (diff) |
old junk removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@16635 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 11 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_proto.h | 1 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_std.cpp | 56 |
3 files changed, 4 insertions, 64 deletions
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index f8c6d98885..d9fca6c2d4 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -236,24 +236,21 @@ int CJabberProto::OnModulesLoadedEx(WPARAM, LPARAM) HookProtoEvent(ME_IDLE_CHANGED, &CJabberProto::OnIdleChanged);
CheckAllContactsAreTransported();
- ConvertPasswords();
// Set all contacts to offline
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
SetContactOfflineStatus(hContact);
- if (!getByte(hContact, "IsTransport", 0))
- continue;
-
ptrT jid(getTStringA(hContact, "jid"));
if (jid == NULL)
continue;
- TCHAR *domain = NEWTSTR_ALLOCA(jid);
- TCHAR *resourcepos = _tcschr(domain, '/');
+ TCHAR *resourcepos = _tcschr(jid, '/');
if (resourcepos != NULL)
*resourcepos = '\0';
- m_lstTransports.insert(mir_tstrdup(domain));
+
+ if (getByte(hContact, "IsTransport", 0))
+ m_lstTransports.insert(mir_tstrdup(jid));
}
return 0;
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index e24802ccb0..5bb94655b7 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -655,7 +655,6 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void SearchAddToRecent(const TCHAR *szAddr, HWND hwndDialog = NULL);
//---- jabber_std.cpp ----------------------------------------------
- void ConvertPasswords();
void JLoginFailed(int errorCode);
//---- jabber_svc.c ------------------------------------------------------------------
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 |