9 "layeh.com/gumble/gumble"
10 "layeh.com/gumble/gumbleutil"
11 _ "layeh.com/gumble/opus"
16 server := flag.String("server", "localhost:64738", "the server to connect to")
17 username := flag.String("username", "", "the username of the client")
18 password := flag.String("password", "", "the password of the server")
19 insecure := flag.Bool("insecure", false, "skip server certificate verification")
20 certificate := flag.String("certificate", "", "PEM encoded certificate and private key")
21 channel := flag.String("channel", "", "initial channel")
27 Config: gumble.NewConfig(),
29 DefaultChannel: *channel,
32 b.Config.Username = *username
33 b.Config.Password = *password
36 b.TLSConfig.InsecureSkipVerify = true
38 if *certificate != "" {
39 cert, err := tls.LoadX509KeyPair(*certificate, *certificate)
41 fmt.Fprintf(os.Stderr, "%s\n", err)
44 b.TLSConfig.Certificates = append(b.TLSConfig.Certificates, cert)
47 keepAlive := make(chan bool)
49 b.Config.Attach(gumbleutil.Listener{
50 Disconnect: func(e *gumble.DisconnectEvent) {