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

8
ui.go
View File

@@ -39,7 +39,7 @@ func (b *Barnard) AddOutputMessage(sender *gumble.User, message string) {
if sender == nil {
b.AddOutputLine(message)
} else {
b.AddOutputLine(fmt.Sprintf("%s: %s", sender.Name(), strings.TrimSpace(esc(message))))
b.AddOutputLine(fmt.Sprintf("%s: %s", sender.Name, strings.TrimSpace(esc(message))))
}
}
@@ -96,9 +96,9 @@ func (b *Barnard) OnTextInput(ui *uiterm.Ui, textbox *uiterm.Textbox, text strin
if text == "" {
return
}
if b.Client != nil && b.Client.Self() != nil {
b.Client.Self().Channel().Send(text, false)
b.AddOutputMessage(b.Client.Self(), text)
if b.Client != nil && b.Client.Self != nil {
b.Client.Self.Channel.Send(text, false)
b.AddOutputMessage(b.Client.Self, text)
}
}