Skip to content

Commit

Permalink
Update libs, fix chat event handler
Browse files Browse the repository at this point in the history
  • Loading branch information
ExtraJuiceMan committed Feb 19, 2018
1 parent 9053c0f commit b724b77
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 15 deletions.
26 changes: 17 additions & 9 deletions DiscordHook/DiscordHook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ private void OnPlayerLeave(SteamPlayer player)
Sender.SendSingle(Messages.Generate_PlayerStatus(Translations.Instance["player_status_leave"], player, bot), bot);
}

private void OnPlayerChat(SteamPlayer player, EChatMode mode, ref Color color, string text, ref bool visible)
private void OnPlayerChat(SteamPlayer player, EChatMode mode, ref Color color, ref bool rich, string text, ref bool visible)
{
if (text.StartsWith("/") || text.StartsWith("@"))
{
Expand All @@ -324,14 +324,22 @@ private void OnPlayerChat(SteamPlayer player, EChatMode mode, ref Color color, s
}
string title;

if (mode == EChatMode.GLOBAL)
title = Translations.Instance["player_chat_global"];
else if (mode == EChatMode.GROUP)
title = Translations.Instance["player_chat_group"];
else if (mode == EChatMode.LOCAL)
title = Translations.Instance["player_chat_local"];
else
title = Translations.Instance["player_chat"];
switch (mode)
{
case EChatMode.GLOBAL:
title = Translations.Instance["player_chat_global"];
break;
case EChatMode.GROUP:
title = Translations.Instance["player_chat_group"];
break;
case EChatMode.LOCAL:
title = Translations.Instance["player_chat_local"];
break;
default:
title = Translations.Instance["player_chat"];
break;

}

foreach (ServerSetting bot in Configuration.Instance.Bots)
if ((mode == EChatMode.GLOBAL && bot.SendGlobalMessages) || (mode == EChatMode.GROUP && bot.SendGroupMessages) || (mode == EChatMode.LOCAL && bot.SendLocalMessages))
Expand Down
6 changes: 0 additions & 6 deletions DiscordHook/DiscordHook.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,22 @@
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>..\Libraries\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>..\Libraries\Assembly-CSharp-firstpass.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\Libraries\Newtonsoft.Json.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rocket.API">
<HintPath>..\Libraries\Rocket.API.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rocket.Core">
<HintPath>..\Libraries\Rocket.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Rocket.Unturned">
<HintPath>..\Libraries\Rocket.Unturned.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -63,7 +58,6 @@
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>..\Libraries\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
Binary file modified Libraries/Assembly-CSharp-firstpass.dll
Binary file not shown.
Binary file modified Libraries/Assembly-CSharp.dll
Binary file not shown.
Binary file modified Libraries/Rocket.API.dll
Binary file not shown.
Binary file modified Libraries/Rocket.Core.dll
Binary file not shown.
Binary file modified Libraries/Rocket.Unturned.dll
Binary file not shown.
Binary file modified Libraries/UnityEngine.dll
Binary file not shown.

0 comments on commit b724b77

Please sign in to comment.