Add chat-addressee dropdown, refs #1767.

Add observer-only chat and allow private messages from observer to
observer.
Prevent defeated players from using the team-chat, fixes #3441.

This was SVN commit r17771.
This commit is contained in:
elexis
2016-02-18 01:09:56 +00:00
parent 365cbf5b64
commit f8b20d181d
7 changed files with 167 additions and 50 deletions
+9
View File
@@ -381,6 +381,14 @@ void DisconnectNetworkGame(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
SAFE_DELETE(g_Game);
}
std::string GetPlayerGUID(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
{
if (!g_NetClient)
return "";
return g_NetClient->GetGUID();
}
bool KickPlayer(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const CStrW& playerName, bool ban)
{
if (!g_NetServer)
@@ -1016,6 +1024,7 @@ void GuiScriptingInit(ScriptInterface& scriptInterface)
scriptInterface.RegisterFunction<void, std::wstring, &StartNetworkHost>("StartNetworkHost");
scriptInterface.RegisterFunction<void, std::wstring, std::string, &StartNetworkJoin>("StartNetworkJoin");
scriptInterface.RegisterFunction<void, &DisconnectNetworkGame>("DisconnectNetworkGame");
scriptInterface.RegisterFunction<std::string, &GetPlayerGUID>("GetPlayerGUID");
scriptInterface.RegisterFunction<bool, CStrW, bool, &KickPlayer>("KickPlayer");
scriptInterface.RegisterFunction<JS::Value, &PollNetworkClient>("PollNetworkClient");
scriptInterface.RegisterFunction<void, JS::HandleValue, &SetNetworkGameAttributes>("SetNetworkGameAttributes");