switch m := m.(type) {
case PublicMsg:
if u == m.From() {
+ if !cfg.Echo {
+ return ""
+ }
out += m.RenderSelf(cfg)
} else {
out += m.RenderFor(cfg)
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,
- Theme: DefaultTheme,
}
// TODO: Seed random?
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)
+ }
+
}