diff options
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/src/chat.cpp | 8 | ||||
-rw-r--r-- | protocols/FacebookRM/src/contacts.cpp | 10 | ||||
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 8 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 4 | ||||
-rw-r--r-- | protocols/FacebookRM/src/theme.cpp | 4 |
5 files changed, 17 insertions, 17 deletions
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index 6db84be8b9..f19990da10 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -39,7 +39,7 @@ void FacebookProto::UpdateChat(const TCHAR *tchat_id, const char *id, const char gce.ptszText = ttext; gce.time = timestamp ? timestamp : ::time(NULL); if (id != NULL) - gce.bIsMe = !strcmp(id, facy.self_.user_id.c_str()); + gce.bIsMe = !mir_strcmp(id, facy.self_.user_id.c_str()); gce.dwFlags |= GCEF_ADDTOLOG; if (is_old) { gce.dwFlags |= GCEF_NOTNOTIFY; @@ -67,7 +67,7 @@ int FacebookProto::OnGCEvent(WPARAM, LPARAM lParam) { GCHOOK *hook = reinterpret_cast<GCHOOK*>(lParam); - if (strcmp(hook->pDest->pszModule, m_szModuleName)) + if (mir_strcmp(hook->pDest->pszModule, m_szModuleName)) return 0; // Ignore for special chatrooms @@ -177,7 +177,7 @@ void FacebookProto::AddChatContact(const TCHAR *tchat_id, const char *id, const gce.ptszNick = tnick; gce.ptszUID = tid; gce.time = ::time(NULL); - gce.bIsMe = !strcmp(id, facy.self_.user_id.c_str()); + gce.bIsMe = !mir_strcmp(id, facy.self_.user_id.c_str()); if (gce.bIsMe) { gce.ptszStatus = TranslateT("Myself"); @@ -197,7 +197,7 @@ void FacebookProto::AddChatContact(const TCHAR *tchat_id, const char *id, const void FacebookProto::RemoveChatContact(const TCHAR *tchat_id, const char *id, const char *name) { // We dont want to remove our self-contact from chat. Ever. - if (!strcmp(id, facy.self_.user_id.c_str())) + if (!mir_strcmp(id, facy.self_.user_id.c_str())) return; ptrT tnick(mir_a2t_cp(name, CP_UTF8)); diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index b0bd083ad6..e4cd53e091 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -27,7 +27,7 @@ void updateStringUtf(FacebookProto *proto, MCONTACT hContact, const char *key, c DBVARIANT dbv; if (!proto->getStringUtf(hContact, key, &dbv)) { - update_required = strcmp(dbv.pszVal, value.c_str()) != 0; + update_required = mir_strcmp(dbv.pszVal, value.c_str()) != 0; db_free(&dbv); } @@ -67,7 +67,7 @@ void FacebookProto::SaveName(MCONTACT hContact, const facebook_user *fbu) bool FacebookProto::IsMyContact(MCONTACT hContact, bool include_chat) { const char *proto = GetContactProto(hContact); - if (proto && !strcmp(m_szModuleName, proto)) { + if (proto && !mir_strcmp(m_szModuleName, proto)) { if (include_chat) return true; return !isChatRoom(hContact); @@ -130,7 +130,7 @@ MCONTACT FacebookProto::ContactIDToHContact(const std::string &user_id) continue; ptrA id(getStringA(hContact, FACEBOOK_KEY_ID)); - if (id && !strcmp(id, user_id.c_str())) { + if (id && !mir_strcmp(id, user_id.c_str())) { facy.user_id_to_hcontact.insert(std::make_pair(user_id, hContact)); return hContact; } @@ -158,7 +158,7 @@ std::string FacebookProto::ThreadIDToContactID(const std::string &thread_id) continue; ptrA tid(getStringA(hContact, FACEBOOK_KEY_TID)); - if (tid && !strcmp(tid, thread_id.c_str())) { + if (tid && !mir_strcmp(tid, thread_id.c_str())) { ptrA id(getStringA(hContact, FACEBOOK_KEY_ID)); std::string user_id = (id ? id : ""); if (!user_id.empty()) { @@ -235,7 +235,7 @@ void FacebookProto::LoadParticipantsNames(facebook_chatroom *fbc) { for (std::map<std::string, std::string>::iterator it = fbc->participants.begin(); it != fbc->participants.end(); ++it) { if (it->second.empty()) { - if (!strcmp(it->first.c_str(), facy.self_.user_id.c_str())) + if (!mir_strcmp(it->first.c_str(), facy.self_.user_id.c_str())) it->second = facy.self_.real_name; else { MCONTACT hContact = ContactIDToHContact(it->first.c_str()); diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index c36953563a..c5687cc899 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -217,7 +217,7 @@ void FacebookProto::ProcessFriendList(void*) // Update username ptrA username(getStringA(hContact, FACEBOOK_KEY_USERNAME)); - if (!username || strcmp(username, fbu->username.c_str())) { + if (!username || mir_strcmp(username, fbu->username.c_str())) { if (!fbu->username.empty()) setString(hContact, FACEBOOK_KEY_USERNAME, fbu->username.c_str()); else @@ -725,7 +725,7 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message*> messages, boo // Save TID if not exists already ptrA tid(getStringA(hChatContact, FACEBOOK_KEY_TID)); - if (!tid || strcmp(tid, messages[i]->thread_id.c_str())) + if (!tid || mir_strcmp(tid, messages[i]->thread_id.c_str())) setString(hChatContact, FACEBOOK_KEY_TID, messages[i]->thread_id.c_str()); // Try to map name of this chat participant to his id @@ -775,7 +775,7 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message*> messages, boo // Save TID if not exists already ptrA tid(getStringA(hContact, FACEBOOK_KEY_TID)); - if (!tid || strcmp(tid, messages[i]->thread_id.c_str())) + if (!tid || mir_strcmp(tid, messages[i]->thread_id.c_str())) setString(hContact, FACEBOOK_KEY_TID, messages[i]->thread_id.c_str()); if (messages[i]->isIncoming && messages[i]->isUnread && messages[i]->type == MESSAGE) { @@ -961,7 +961,7 @@ void FacebookProto::ProcessFriendRequests(void*) bool isNew = false; ptrA oldTime(getStringA(hContact, "RequestTime")); - if (oldTime == NULL || strcmp(oldTime, time.c_str())) { + if (oldTime == NULL || mir_strcmp(oldTime, time.c_str())) { // This is new request isNew = true; setString(hContact, "RequestTime", time.c_str()); diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index a8a65bc88a..afa5303574 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -616,7 +616,7 @@ int FacebookProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam) int FacebookProto::OnPreCreateEvent(WPARAM, LPARAM lParam) { MessageWindowEvent *evt = (MessageWindowEvent *)lParam; - if (strcmp(GetContactProto(evt->hContact), m_szModuleName)) + if (mir_strcmp(GetContactProto(evt->hContact), m_szModuleName)) return 0; std::map<int, time_t>::iterator it = facy.messages_timestamp.find(evt->seq); @@ -854,7 +854,7 @@ MCONTACT FacebookProto::HContactFromAuthEvent(MEVENT hEvent) if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return INVALID_CONTACT_ID; - if (strcmp(dbei.szModule, m_szModuleName)) + if (mir_strcmp(dbei.szModule, m_szModuleName)) return INVALID_CONTACT_ID; return DbGetAuthEventContact(&dbei); diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index bf3e953cc3..50ff063a14 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -57,7 +57,7 @@ void InitIcons(void) HANDLE GetIconHandle(const char* name)
{
for (size_t i = 0; i < SIZEOF(icons); i++)
- if (strcmp(icons[i].szName, name) == 0)
+ if (mir_strcmp(icons[i].szName, name) == 0)
return icons[i].hIcolib;
return 0;
@@ -71,7 +71,7 @@ static FacebookProto * GetInstanceByHContact(MCONTACT hContact) return 0;
for (int i = 0; i < g_Instances.getCount(); i++)
- if (!strcmp(proto, g_Instances[i].m_szModuleName))
+ if (!mir_strcmp(proto, g_Instances[i].m_szModuleName))
return &g_Instances[i];
return 0;
|