1
0
Fork 0
mirror of https://github.com/sbrl/Nibriboard.git synced 2018-01-10 21:33:49 +00:00

[server] Add ReflectPlane method for sending messages later

This commit is contained in:
Starbeamrainbowlabs 2017-04-15 16:45:56 +01:00
parent 5dc1a2d9e5
commit 4d09301187

View file

@ -112,6 +112,21 @@ namespace Nibriboard.Client
}
}
/// <summary>
/// Sends a message to everyone on a specified plane.
/// </summary>
/// <param name="plane">The plane to send the message to.</param>
/// <param name="message">The message to send.</param>
public void ReflectPlane(Plane plane, Message message)
{
foreach(NibriClient client in Clients)
{
if(client.CurrentPlane != plane)
continue;
client.Send(message);
}
}
/// <summary>
/// Periodically tidies up the client list, disconnecting old clients.
/// </summary>