private void ProtocolHandler(object sender, MumblePacketEventArgs args) { var proto = args.Message as IProtocolHandler; proto?.HandleMessage(this); }
void MumbleText(object sender, MumblePacketEventArgs e) { foreach (var channel in BotMethods.JoinedChannels) { var message = (TextMessage)e.Message; var user = client.FindUser(message.actor); BotMethods.SendMessage(SendType.Message, channel, user.Name + ": " + message.message); } }
private void PacketReceivedHandler(object sender, MumblePacketEventArgs args) { var proto = args.Message as IProtocolHandler; Console.WriteLine(proto.Inspect()); }
void MumbleConnected(object sender, MumblePacketEventArgs e) { var channelName = MumbleSettings.Default.MumbleChannel; if (channelName == null) { return; } var channel = client.FindChannel(channelName); client.SwitchChannel(channel); }