Пример #1
0
 private static void SuccessfulConnect(CybergameChannel channel, CybergameData data)
 {
     channel.Chat.Status.IsConnected = true;
     if (channel.JoinCallback != null)
     {
         channel.JoinCallback(channel);
     }
 }
Пример #2
0
        private static void ChatMessageReceive(CybergameChannel channel, CybergameData data)
        {
            if (String.IsNullOrWhiteSpace(data.From) || String.IsNullOrWhiteSpace(data.Text))
            {
                return;
            }

            channel.ChannelStats.MessagesCount++;
            channel.Chat.UpdateStats();

            if (channel.ReadMessage != null)
            {
                channel.ReadMessage(new ChatMessage()
                {
                    Channel         = channel.ChannelName,
                    ChatIconURL     = channel.Chat.IconURL,
                    ChatName        = channel.Chat.ChatName,
                    FromUserName    = data.From,
                    HighlyImportant = false,
                    IsSentByMe      = false,
                    Text            = HttpUtility.HtmlDecode(data.Text),
                });
            }
        }
Пример #3
0
 private static void ListUsers(CybergameChannel channel, CybergameData data)
 {
 }
Пример #4
0
 private static void SuccessfulLogin(CybergameChannel channel, CybergameData data)
 {
     channel.Chat.Status.IsLoggedIn = true;
 }