9 "github.com/kennygrant/sanitize"
10 "layeh.com/gumble/gumble"
13 func esc(str string) string {
14 return sanitize.HTML(str)
17 func (b *Barnard) UpdateInputStatus(status string) {
18 fmt.Fprintf(os.Stdout, "input status: %s\n", status)
21 func (b *Barnard) AddOutputLine(line string) {
23 fmt.Fprintf(os.Stdout, "[%02d:%02d:%02d] %s\n", now.Hour(), now.Minute(), now.Second(), line)
26 func (b *Barnard) AddOutputMessage(sender *gumble.User, message string) {
28 b.AddOutputLine(message)
30 b.AddOutputLine(fmt.Sprintf("%s: %s", sender.Name, strings.TrimSpace(esc(message))))