diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-30 17:32:39 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-30 17:32:39 +0000 |
commit | 109877a3c75cb290c55755dcfc88794d2453669d (patch) | |
tree | 3ede8b9170b2fc3f6f35dc2cea6742d44b19d631 /protocols/IRCG/src | |
parent | fee8d991bdf4a59b563d1b92165ea0ed2f7bacb8 (diff) |
MS_DB_EVENT_* services remained, but their calls removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@4255 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IRCG/src')
-rw-r--r-- | protocols/IRCG/src/clist.cpp | 6 | ||||
-rw-r--r-- | protocols/IRCG/src/commandmonitor.cpp | 7 | ||||
-rw-r--r-- | protocols/IRCG/src/services.cpp | 2 | ||||
-rw-r--r-- | protocols/IRCG/src/userinfo.cpp | 8 |
4 files changed, 11 insertions, 12 deletions
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp index 4d189ce3bb..e2b0454a35 100644 --- a/protocols/IRCG/src/clist.cpp +++ b/protocols/IRCG/src/clist.cpp @@ -146,8 +146,8 @@ bool CIrcProto::CList_SetAllOffline(BYTE ChatsToo) HANDLE hContact = db_find_first();
while ( hContact ) {
- char* szProto = ( char* ) CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0 );
- if ( szProto != NULL && !lstrcmpiA( szProto, m_szModuleName )) {
+ char* szProto = GetContactProto(hContact);
+ if (szProto != NULL && !lstrcmpiA( szProto, m_szModuleName)) {
if ( getByte( hContact, "ChatRoom", 0 ) == 0 ) {
if ( getByte(hContact, "DCC", 0 ) != 0 ) {
if ( ChatsToo )
@@ -184,7 +184,7 @@ HANDLE CIrcProto::CList_FindContact (CONTACT* user) DBVARIANT dbv5;
HANDLE hContact = db_find_first();
while (hContact) {
- szProto = ( char* ) CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ szProto = GetContactProto(hContact);
if ( szProto != NULL && !lstrcmpiA( szProto, m_szModuleName )) {
if ( getByte( hContact, "ChatRoom", 0) == 0) {
HANDLE hContact_temp = NULL;
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 83bbd9689e..3108066951 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -143,7 +143,7 @@ VOID CALLBACK OnlineNotifTimerProc( HWND, UINT, UINT_PTR idEvent, DWORD ) HANDLE hContact = db_find_first();
while ( hContact ) {
- szProto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
+ szProto = GetContactProto(hContact);
if ( szProto != NULL && !lstrcmpiA( szProto, ppro->m_szModuleName )) {
BYTE bRoom = ppro->getByte(hContact, "ChatRoom", 0);
if ( bRoom == 0 ) {
@@ -223,15 +223,14 @@ int CIrcProto::AddOutgoingMessageToDB(HANDLE hContact, TCHAR* msg) CMString S = DoColorCodes( msg, TRUE, FALSE );
- DBEVENTINFO dbei = {0};
- dbei.cbSize = sizeof(dbei);
+ DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = m_szModuleName;
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.timestamp = (DWORD)time(NULL);
dbei.flags = DBEF_SENT + DBEF_UTF;
dbei.pBlob = ( PBYTE )mir_utf8encodeW( S.c_str());
dbei.cbBlob = (DWORD)strlen(( char* )dbei.pBlob) + 1;
- CallService( MS_DB_EVENT_ADD, (WPARAM) hContact, (LPARAM) & dbei);
+ db_event_add(hContact, &dbei);
mir_free( dbei.pBlob );
return 1;
}
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 54dbfd2ea2..b65c92f728 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -1013,7 +1013,7 @@ int __cdecl CIrcProto::OnMenuPreBuild(WPARAM wParam, LPARAM) CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | CMIM_NAME | CMIM_ICON;
- char *szProto = ( char* ) CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) wParam, 0);
+ char *szProto = GetContactProto(hContact);
if ( szProto && !lstrcmpiA(szProto, m_szModuleName)) {
bool bIsOnline = getWord(hContact, "Status", ID_STATUS_OFFLINE)== ID_STATUS_OFFLINE ? false : true;
if ( getByte(hContact, "ChatRoom", 0) == GCW_CHATROOM) {
diff --git a/protocols/IRCG/src/userinfo.cpp b/protocols/IRCG/src/userinfo.cpp index 9a5793c979..35a23f3ca1 100644 --- a/protocols/IRCG/src/userinfo.cpp +++ b/protocols/IRCG/src/userinfo.cpp @@ -188,15 +188,15 @@ INT_PTR CALLBACK UserDetailsDlgProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARAM int __cdecl CIrcProto::OnInitUserInfo(WPARAM wParam, LPARAM lParam)
{
- char* szProto = ( char* )CallService( MS_PROTO_GETCONTACTBASEPROTO, lParam, 0);
- HANDLE hContact = (HANDLE) lParam;
+ HANDLE hContact = (HANDLE)lParam;
+ char *szProto = GetContactProto(hContact);
if ( !hContact || !szProto || lstrcmpiA( szProto, m_szModuleName ))
return 0;
- if ( getByte( hContact, "ChatRoom", 0 ) != 0 )
+ if ( getByte( hContact, "ChatRoom", 0) != 0 )
return 0;
- if ( getByte( hContact, "DCC", 0 ) != 0 )
+ if ( getByte( hContact, "DCC", 0) != 0)
return 0;
DBVARIANT dbv;
|