summaryrefslogtreecommitdiff
path: root/protocols/MinecraftDynmap/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-09-16 19:43:24 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-09-16 19:43:24 +0000
commit0c41e6c4566fdb2d99b8a6ca1fb48859fd4a0e34 (patch)
tree700937499ee66952d1ca5b92928fc9ec3b034447 /protocols/MinecraftDynmap/src
parent7a7a6637021d78ad995f3e21e9743fae69bd2562 (diff)
- chats services replaces with functions;
- chat calls switched from CallServiceSync to direct calls everywhere git-svn-id: http://svn.miranda-ng.org/main/trunk@17305 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MinecraftDynmap/src')
-rw-r--r--protocols/MinecraftDynmap/src/chat.cpp28
-rw-r--r--protocols/MinecraftDynmap/src/proto.cpp2
2 files changed, 15 insertions, 15 deletions
diff --git a/protocols/MinecraftDynmap/src/chat.cpp b/protocols/MinecraftDynmap/src/chat.cpp
index d41748bd84..c4e4fd0b87 100644
--- a/protocols/MinecraftDynmap/src/chat.cpp
+++ b/protocols/MinecraftDynmap/src/chat.cpp
@@ -47,7 +47,7 @@ void MinecraftDynmapProto::UpdateChat(const char *name, const char *message, con
gce.ptszNick = tname;
gce.ptszUID = gce.ptszNick;
- CallServiceSync(MS_GC_EVENT,0,reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(0, &gce);
}
int MinecraftDynmapProto::OnChatEvent(WPARAM, LPARAM lParam)
@@ -103,7 +103,7 @@ void MinecraftDynmapProto::AddChatContact(const char *name)
else
gce.ptszStatus = L"Normal";
- CallServiceSync(MS_GC_EVENT,0,reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(0,&gce);
}
void MinecraftDynmapProto::DeleteChatContact(const char *name)
@@ -118,7 +118,7 @@ void MinecraftDynmapProto::DeleteChatContact(const char *name)
gce.time = DWORD(time(0));
gce.bIsMe = (m_nick == name);
- CallServiceSync(MS_GC_EVENT,0,reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(0,&gce);
}
INT_PTR MinecraftDynmapProto::OnJoinChat(WPARAM,LPARAM suppress)
@@ -131,7 +131,7 @@ INT_PTR MinecraftDynmapProto::OnJoinChat(WPARAM,LPARAM suppress)
gcw.ptszID = m_tszUserName;
gcw.ptszName = tszTitle;
gcw.pszModule = m_szModuleName;
- CallServiceSync(MS_GC_NEWSESSION, 0, (LPARAM)&gcw);
+ Chat_NewSession(&gcw);
if (m_iStatus == ID_STATUS_OFFLINE)
return 0;
@@ -141,10 +141,10 @@ INT_PTR MinecraftDynmapProto::OnJoinChat(WPARAM,LPARAM suppress)
GCEVENT gce = { sizeof(gce), &gcd };
gce.ptszStatus = L"Admin";
- CallServiceSync(MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(NULL, &gce);
gce.ptszStatus = L"Normal";
- CallServiceSync(MS_GC_EVENT, NULL, reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(NULL, &gce);
// Note: Initialization will finish up in SetChatStatus, called separately
if (!suppress)
@@ -162,7 +162,7 @@ void MinecraftDynmapProto::SetTopic(const char *topic)
gce.time = ::time(NULL);
gce.ptszText = ttopic;
- CallServiceSync(MS_GC_EVENT,0, reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(0, &gce);
}
INT_PTR MinecraftDynmapProto::OnLeaveChat(WPARAM,LPARAM)
@@ -171,8 +171,8 @@ INT_PTR MinecraftDynmapProto::OnLeaveChat(WPARAM,LPARAM)
GCEVENT gce = { sizeof(gce), &gcd };
gce.time = ::time(NULL);
- CallServiceSync(MS_GC_EVENT,SESSION_OFFLINE, reinterpret_cast<LPARAM>(&gce));
- CallServiceSync(MS_GC_EVENT,SESSION_TERMINATE,reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(SESSION_OFFLINE, &gce);
+ Chat_Event(SESSION_TERMINATE,&gce);
return 0;
}
@@ -196,12 +196,12 @@ void MinecraftDynmapProto::SetChatStatus(int status)
// Add self contact
AddChatContact(m_nick.c_str());
- CallServiceSync(MS_GC_EVENT,SESSION_INITDONE,reinterpret_cast<LPARAM>(&gce));
- CallServiceSync(MS_GC_EVENT,SESSION_ONLINE, reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(SESSION_INITDONE,&gce);
+ Chat_Event(SESSION_ONLINE, &gce);
}
else
{
- CallServiceSync(MS_GC_EVENT,SESSION_OFFLINE,reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(SESSION_OFFLINE,&gce);
}
}
@@ -209,7 +209,7 @@ void MinecraftDynmapProto::ClearChat()
{
GCDEST gcd = { m_szModuleName, m_tszUserName, GC_EVENT_CONTROL };
GCEVENT gce = { sizeof(gce), &gcd };
- CallServiceSync(MS_GC_EVENT, WINDOW_CLEARLOG, reinterpret_cast<LPARAM>(&gce));
+ Chat_Event(WINDOW_CLEARLOG, &gce);
}
// TODO: Could this be done better?
@@ -232,7 +232,7 @@ MCONTACT MinecraftDynmapProto::GetChatHandle()
gci.Flags = GCF_HCONTACT;
gci.pszModule = m_szModuleName;
gci.pszID = m_tszUserName;
- CallService(MS_GC_GETINFO, 0, (LPARAM)&gci);
+ Chat_GetInfo(&gci);
return gci.hContact;
} \ No newline at end of file
diff --git a/protocols/MinecraftDynmap/src/proto.cpp b/protocols/MinecraftDynmap/src/proto.cpp
index 147d9924a0..9fb913869b 100644
--- a/protocols/MinecraftDynmap/src/proto.cpp
+++ b/protocols/MinecraftDynmap/src/proto.cpp
@@ -167,7 +167,7 @@ int MinecraftDynmapProto::OnModulesLoaded(WPARAM, LPARAM)
gcr.iMaxText = MINECRAFTDYNMAP_MESSAGE_LIMIT;
gcr.nColors = 0;
gcr.pColors = NULL;
- CallService(MS_GC_REGISTER, 0, reinterpret_cast<LPARAM>(&gcr));
+ Chat_Register(&gcr);
return 0;
}