-package barnard
+package main
import (
"fmt"
"net"
"os"
- "github.com/layeh/gumble/gumble"
- "github.com/layeh/gumble/gumbleopenal"
- "github.com/layeh/gumble/gumbleutil"
+ "layeh.com/gumble/gumble"
+ "layeh.com/gumble/gumbleopenal"
+ "layeh.com/gumble/gumbleutil"
)
func (b *Barnard) start() {
func (b *Barnard) OnConnect(e *gumble.ConnectEvent) {
b.Client = e.Client
- b.Ui.SetActive(uiViewInput)
- b.UiTree.Rebuild()
- b.Ui.Refresh()
-
b.UpdateInputStatus(fmt.Sprintf("To: %s", e.Client.Self.Channel.Name))
b.AddOutputLine(fmt.Sprintf("Connected to %s", b.Client.Conn.RemoteAddr()))
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) {