private static void SuccessfulConnect(CybergameChannel channel, CybergameData data) { channel.Chat.Status.IsConnected = true; if (channel.JoinCallback != null) { channel.JoinCallback(channel); } }
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), }); } }
private static void ListUsers(CybergameChannel channel, CybergameData data) { }
private static void SuccessfulLogin(CybergameChannel channel, CybergameData data) { channel.Chat.Status.IsLoggedIn = true; }