mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-25 09:47:18 +00:00
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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user