SendChat function in server
This commit is contained in:
@@ -306,6 +306,11 @@ namespace OpenRA.Server
|
|||||||
return a(cmdValue);
|
return a(cmdValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void SendChat(Connection asConn, string text)
|
||||||
|
{
|
||||||
|
DispatchOrders(null, 0, new ServerOrder(asConn.PlayerIndex, "Chat", text).Serialize());
|
||||||
|
}
|
||||||
|
|
||||||
static void InterpretServerOrder(Connection conn, ServerOrder so)
|
static void InterpretServerOrder(Connection conn, ServerOrder so)
|
||||||
{
|
{
|
||||||
switch (so.Name)
|
switch (so.Name)
|
||||||
@@ -342,9 +347,7 @@ namespace OpenRA.Server
|
|||||||
Console.WriteLine(e.ToString());
|
Console.WriteLine(e.ToString());
|
||||||
|
|
||||||
conns.Remove(toDrop);
|
conns.Remove(toDrop);
|
||||||
|
SendChat(toDrop, "Connection Dropped");
|
||||||
DispatchOrders(toDrop, 0,
|
|
||||||
new ServerOrder(toDrop.PlayerIndex, "Chat", "Connection Dropped").Serialize());
|
|
||||||
|
|
||||||
/* don't get stuck waiting for the dropped player, if they were the one holding up a frame */
|
/* don't get stuck waiting for the dropped player, if they were the one holding up a frame */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user