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:
parent
5dc1a2d9e5
commit
4d09301187
1 changed files with 15 additions and 0 deletions
|
@ -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>
|
/// <summary>
|
||||||
/// Periodically tidies up the client list, disconnecting old clients.
|
/// Periodically tidies up the client list, disconnecting old clients.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in a new issue