if e.WelcomeMessage != nil {
b.AddOutputLine(fmt.Sprintf("Welcome message: %s", esc(*e.WelcomeMessage)))
}
+ if (b.DefaultChannel != "") {
+ b.Client.Self.Move(b.Client.Channels.Find(b.DefaultChannel))
+ }
+
}
func (b *Barnard) OnDisconnect(e *gumble.DisconnectEvent) {
password := flag.String("password", "", "the password of the server")
insecure := flag.Bool("insecure", false, "skip server certificate verification")
certificate := flag.String("certificate", "", "PEM encoded certificate and private key")
+ channel := flag.String("channel", "", "initial channel")
flag.Parse()
b := Barnard{
Config: gumble.NewConfig(),
Address: *server,
+ DefaultChannel: *channel,
}
b.Config.Username = *username