]> git.0d.be Git - barnard.git/blobdiff - client.go
remove UI stuff, turn into CLI
[barnard.git] / client.go
index 8ef6d362e0fe362dc0221351ed2d4f07feb644c5..420aae2bd89decb1af48431efc141aa53e6fe276 100644 (file)
--- a/client.go
+++ b/client.go
@@ -1,13 +1,13 @@
-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() {
@@ -36,15 +36,15 @@ 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) {