private void SendCredentials() { var token = Chat.Config.GetParameterValue("AuthToken").ToString(); var authPacket = new CybergamePacket() { Command = "login", Message = new CybergameData() { Login = Chat.NickName ?? "", Password = token ?? "", Channel = ChannelName, }, }; Log.WriteInfo("Cybergame sending {0}", authPacket.ToString()); webSocket.Send(authPacket.ToString()); }
public override void SendMessage(ChatMessage message) { if (Chat.IsAnonymous || String.IsNullOrWhiteSpace(message.Channel) || String.IsNullOrWhiteSpace(message.FromUserName) || String.IsNullOrWhiteSpace(message.Text)) { return; } var messagePacket = new CybergamePacket() { Command = "sendChatMessage", Message = new CybergameData() { Message = message.Text, } }; webSocket.Send(messagePacket.ToString()); }