예제 #1
0
 void ServerSendMessage(Message.ID id, MessageBase msg, byte channel, List<ServerPlayer> players)
 {
     foreach(var p in players)
     {
         p.connection.SendByChannel((short)id, msg, channel);
     }
 }
예제 #2
0
 void ServerSendMessage(Message.ID id, MessageBase msg, byte channel, List<NetworkConnection> playerConnectionList)
 {
     foreach(NetworkConnection nc in playerConnectionList)
     {
         nc.SendByChannel((short)id, msg, channel);
     }
 }
예제 #3
0
 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);
 }
예제 #4
0
 // ===========================================================================
 // ========================= 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);
 }
예제 #5
0
파일: Program.cs 프로젝트: AngryAnt/Keybot
 private async void TryDelete(Channel channel, Message.ID target)
 {
     if (!await API.Chat.DeleteAsync(channel, target))
     {
         Log.Error("Failed to delete message");
     }
 }
예제 #6
0
파일: Program.cs 프로젝트: AngryAnt/Keybot
 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");
     }
 }
예제 #7
0
        // ===========================================================================
        // ========================= 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);
            }
        }
예제 #8
0
파일: Program.cs 프로젝트: AngryAnt/Keybot
 void API.Chat.IListener.OnDelete(Message.ID target)
 {
 }
예제 #9
0
 public Reaction(Message.ID id)
 {
     Self = id;
 }