switch m := m.(type) {
case PublicMsg:
if u == m.From() {
+ if !cfg.Echo {
+ return ""
+ }
out += m.RenderSelf(cfg)
} else {
out += m.RenderFor(cfg)
} else {
ts = ts.UTC()
}
- return cfg.Theme.Timestamp(ts.Format(*cfg.Timeformat) + " " + out + Newline)
+ return cfg.Theme.Timestamp(ts.Format(*cfg.Timeformat)) + " " + out + Newline
}
return out + Newline
}
Highlight *regexp.Regexp
Bell bool
Quiet bool
+ Echo bool // Echo shows your own messages after sending, disabled for bots
Timeformat *string
Timezone *time.Location
Theme *Theme
func init() {
DefaultUserConfig = UserConfig{
Bell: true,
+ Echo: true,
Quiet: false,
}
defer a[i].mu.Unlock()
a[j].mu.Lock()
defer a[j].mu.Unlock()
- return a[i].lastMsg.After(a[j].lastMsg)
+
+ if a[i].lastMsg.IsZero() {
+ return a[i].joined.Before(a[j].joined)
+ } else {
+ return a[i].lastMsg.Before(a[j].lastMsg)
+ }
+
}