update due to gumble API changes

This commit is contained in:
Tim Cooper
2015-02-11 12:07:29 -04:00
parent e336d47fc5
commit b56133e033
3 changed files with 14 additions and 14 deletions

View File

@@ -11,8 +11,8 @@ func (b *Barnard) OnConnect(e *gumble.ConnectEvent) {
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()))
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 != "" {
b.AddOutputLine(fmt.Sprintf("Welcome message: %s", esc(e.WelcomeMessage)))
}
@@ -56,8 +56,8 @@ func (b *Barnard) OnTextMessage(e *gumble.TextMessageEvent) {
}
func (b *Barnard) OnUserChange(e *gumble.UserChangeEvent) {
if e.Type.Has(gumble.UserChangeChannel) && e.User == b.Client.Self() {
b.UpdateInputStatus(fmt.Sprintf("To: %s", e.User.Channel().Name()))
if e.Type.Has(gumble.UserChangeChannel) && e.User == b.Client.Self {
b.UpdateInputStatus(fmt.Sprintf("To: %s", e.User.Channel.Name))
}
b.UiTree.Rebuild()
b.Ui.Refresh()