void ServerSendMessage(Message.ID id, MessageBase msg, byte channel, List<ServerPlayer> players) { foreach(var p in players) { p.connection.SendByChannel((short)id, msg, channel); } }
void ServerSendMessage(Message.ID id, MessageBase msg, byte channel, List<NetworkConnection> playerConnectionList) { foreach(NetworkConnection nc in playerConnectionList) { nc.SendByChannel((short)id, msg, channel); } }
void ServerSendMessage(Message.ID id, MessageBase msg, byte channel, ServerPlayer sp) { if(sp.connection.isConnected) sp.connection.SendByChannel((short)id, msg, channel); else common.printConsole (tag, "Player is not connected on client " + sp.connection.address, true); }
// =========================================================================== // ========================= SEND FUNCTIONS ========================= // =========================================================================== void ServerSendMessage(Message.ID id, MessageBase msg, byte channel, NetworkConnection conn) { if(conn != null) conn.SendByChannel((short)id, msg, channel); else common.printConsole (tag, "Is not connected to client " + conn.address, true); }
private async void TryDelete(Channel channel, Message.ID target) { if (!await API.Chat.DeleteAsync(channel, target)) { Log.Error("Failed to delete message"); } }
private async void TryReact(Channel channel, Message.ID target, [NotNull] string reaction) { if (!await API.Chat.ReactAsync(channel, target, reaction)) { Log.Error("Failed to send reaction"); } }
// =========================================================================== // ========================= SEND FUNCTIONS ========================= // =========================================================================== void ClientSendMessage(Message.ID id, MessageBase msg, byte channel) { if (isConnectedAndAuthenticated()) { myClient.connection.SendByChannel((short)id, msg, channel); } else { common.printConsole(tag, "Is not connected to any server", true); } }
void API.Chat.IListener.OnDelete(Message.ID target) { }
public Reaction(Message.ID id) { Self = id; }