diff options
Diffstat (limited to 'protocols/MSN/src/msn_chat.cpp')
-rw-r--r-- | protocols/MSN/src/msn_chat.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index abdeac5334..386ea11a5f 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -63,19 +63,19 @@ int CMsnProto::MSN_ChatInit(GCThreadData *info, const char *pszID, const char *p gcw.pszModule = m_szModuleName;
gcw.ptszName = szName;
gcw.ptszID = info->mChatID;
- CallServiceSync(MS_GC_NEWSESSION, 0, (LPARAM)&gcw);
+ Chat_NewSession(&gcw);
GCDEST gcd = { m_szModuleName, info->mChatID, GC_EVENT_ADDGROUP };
GCEVENT gce = { sizeof(gce), &gcd };
for (int j = 0; j < _countof(m_ptszRoles); j++) {
gce.ptszStatus = m_ptszRoles[j];
- CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
+ Chat_Event(0, &gce);
}
gcd.iType = GC_EVENT_CONTROL;
- CallServiceSync(MS_GC_EVENT, SESSION_INITDONE, (LPARAM)&gce);
- CallServiceSync(MS_GC_EVENT, SESSION_ONLINE, (LPARAM)&gce);
- CallServiceSync(MS_GC_EVENT, WINDOW_VISIBLE, (LPARAM)&gce);
+ Chat_Event(SESSION_INITDONE, &gce);
+ Chat_Event(SESSION_ONLINE, &gce);
+ Chat_Event(WINDOW_VISIBLE, &gce);
mir_free((wchar_t*)gce.ptszUID);
return 0;
@@ -102,7 +102,7 @@ void CMsnProto::MSN_ChatStart(ezxml_t xmli) else {
GCDEST gcd = { m_szModuleName, info->mChatID, GC_EVENT_CONTROL };
GCEVENT gce = { sizeof(gce), &gcd };
- CallServiceSync(MS_GC_EVENT, SESSION_ONLINE, (LPARAM)&gce);
+ Chat_Event(SESSION_ONLINE, &gce);
}
const char *pszCreator = ezxml_txt(ezxml_get(xmli, "properties", 0, "creator", -1));
@@ -148,8 +148,8 @@ void CMsnProto::MSN_KillChatSession(const wchar_t* id) GCDEST gcd = { m_szModuleName, id, GC_EVENT_CONTROL };
GCEVENT gce = { sizeof(gce), &gcd };
gce.dwFlags = GCEF_REMOVECONTACT;
- CallServiceSync(MS_GC_EVENT, SESSION_OFFLINE, (LPARAM)&gce);
- CallServiceSync(MS_GC_EVENT, SESSION_TERMINATE, (LPARAM)&gce);
+ Chat_Event(SESSION_OFFLINE, &gce);
+ Chat_Event(SESSION_TERMINATE, &gce);
}
void CMsnProto::MSN_Kickuser(GCHOOK *gch)
@@ -190,7 +190,7 @@ void CMsnProto::MSN_GCProcessThreadActivity(ezxml_t xmli, const wchar_t *mChatID MCONTACT hContInitiator = MSN_HContactFromEmail(initiator ? initiator->txt : NULL);
gce.ptszNick = GetContactNameT(hContInitiator);
gce.ptszText = mir_a2u(ezxml_txt(ezxml_child(xmli, "value")));
- CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
+ Chat_Event(0, &gce);
mir_free((wchar_t*)gce.ptszUID);
mir_free((wchar_t*)gce.ptszText);
}
@@ -247,12 +247,12 @@ void CMsnProto::MSN_GCProcessThreadActivity(ezxml_t xmli, const wchar_t *mChatID gce.ptszUID = mir_a2u(pszTarget);
MCONTACT hContTarget = MSN_HContactFromEmail(pszTarget);
gce.ptszNick = GetContactNameT(hContTarget);
- CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
+ Chat_Event(0, &gce);
mir_free((wchar_t*)gce.ptszUID);
if ((gcd.iType == GC_EVENT_PART || gcd.iType == GC_EVENT_KICK) && gce.bIsMe) {
GCDEST gcd2 = { m_szModuleName, mChatID, GC_EVENT_CONTROL };
GCEVENT gce2 = { sizeof(gce2), &gcd2 };
- CallServiceSync(MS_GC_EVENT, SESSION_OFFLINE, (LPARAM)&gce2);
+ Chat_Event(SESSION_OFFLINE, &gce2);
break;
}
target = ezxml_next(target);
@@ -296,7 +296,7 @@ void CMsnProto::MSN_GCAddMessage(wchar_t *mChatID, MCONTACT hContact, char *emai gce.ptszText = EscapeChatTags(p);
mir_free(p);
- CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
+ Chat_Event(0, &gce);
mir_free((void*)gce.ptszUID);
mir_free((void*)gce.ptszText);
}
@@ -516,7 +516,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam) gce.time = time(NULL);
gce.ptszText = gch->ptszText;
gce.bIsMe = TRUE;
- CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce);
+ Chat_Event(0, &gce);
mir_free((void*)gce.ptszUID);
if (!bError)
|