Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Commit

Permalink
Ready for the beta release.
Browse files Browse the repository at this point in the history
  • Loading branch information
AntINFINAit authored and AntINFINAit committed Nov 14, 2020
1 parent d138cf7 commit c1f45dc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
11 changes: 5 additions & 6 deletions ImpostorHQ.Command/Impostor.Commands.Core/AnnouncementServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,30 +67,29 @@ public void Shutdown()
}
private void Listener_NewConnection(NewConnectionEventArgs obj)
{
Console.WriteLine("New connection!");
try
{
if (!WillSend)
{
Console.WriteLine("Will not send!");
obj.Connection.Dispose();
return;
}
lock (Message)
{
obj.Connection.Send(Message);
Console.WriteLine("sent!");
Console.WriteLine(BitConverter.ToString(Message.ToByteArray(true)));
//obj.Connection.Dispose();
obj.Connection.Dispose();
}
}
catch (Exception e)
{
Master.LogManager.LogError(e.ToString(),Shared.ErrorLocation.AnnouncementServer);
}

}

/// <summary>
/// Will get a suitable ID for the announcement. This is vital to ensure that the message is displayed.
/// </summary>
/// <returns></returns>
private int AnnouncementId()
{
lock (_writeLock)
Expand Down
2 changes: 1 addition & 1 deletion ImpostorHQ.Command/Impostor.Commands.Core/Class.cs
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ private void DashboardCommandReceived(Structures.BaseMessage message,IWebSocketC
if (isSingle)
{
isSingle = true;
ApiServer.PushTo("Invalid syntax. Please use \"/announcement <action> (SET/CLEAR)\"!",
ApiServer.PushTo("Invalid syntax. Please use \"/announcement <action> (set ... /clear).\"! Example: \"/announcement set Greetings to all!\"",
Structures.ServerSources.DebugSystem, Structures.MessageFlag.ConsoleLogMessage, client);
break;
}
Expand Down
2 changes: 0 additions & 2 deletions ImpostorHQ.Command/Impostor.Commands.Core/SELF/SelfEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ private void BeginWriteLine(byte logType , UInt64 unixTimeMs)
EncodeStream.SetLength(0);
EncodeStream.WriteByte(logType);
EncodeStream.Write(BitConverter.GetBytes(unixTimeMs), 0, 8);
Console.WriteLine($"Beginning write of type : {(Shared.LogType)logType}");
}

private void EndWriteLine()
Expand All @@ -35,7 +34,6 @@ private void EndWriteLine()
IoStream.Write(EncodeStream.ToArray(), 0, (int) EncodeStream.Length);
EncodeStream.SetLength(0);
IoStream.Flush(); //i know, but this will reduce the occurence of errors.
Console.WriteLine("Ending writes");
}

public void WriteRpcLog(int gameCode, string ipAddress,Shared.RpcCalls rpcCall, byte[] data)
Expand Down

0 comments on commit c1f45dc

Please sign in to comment.