diff --git a/database.go b/database.go index 5fe0676..ad43b7c 100644 --- a/database.go +++ b/database.go @@ -381,7 +381,7 @@ func cleanupdb(arg string) { where = "dt < ? and whofore = 0 and convoy not in (select convoy from honks where whofore = 2 or whofore = 3)" sqlargs = append(sqlargs, expdate) } - doordie(db, "delete from honks where " + where, sqlargs...) + doordie(db, "delete from honks where "+where, sqlargs...) doordie(db, "delete from donks where honkid not in (select honkid from honks)") doordie(db, "delete from onts where honkid not in (select honkid from honks)") doordie(db, "delete from places where honkid not in (select honkid from honks)") diff --git a/fun.go b/fun.go index 5a2cb5d..c58c529 100644 --- a/fun.go +++ b/fun.go @@ -71,13 +71,19 @@ func reverbolate(userid int64, honks []*Honk) { h.Precis = unpucker(h.Precis) h.Noise = unpucker(h.Noise) h.Open = "open" - if badword := unsee(zilences, h.Precis, h.Noise, h.Donks); badword != "" { - if h.Precis == "" { - h.Precis = badword + if userid == -1 { + if h.Precis != "" { + h.Open = "" + } + } else { + if badword := unsee(zilences, h.Precis, h.Noise, h.Donks); badword != "" { + if h.Precis == "" { + h.Precis = badword + } + h.Open = "" + } else if h.Precis == "unspecified horror" { + h.Precis = "" } - h.Open = "" - } else if h.Precis == "unspecified horror" { - h.Precis = "" } h.HTPrecis, _ = filt.String(h.Precis) h.HTML, _ = filt.String(h.Noise) diff --git a/views/honk.html b/views/honk.html index a4200bb..58fbba1 100644 --- a/views/honk.html +++ b/views/honk.html @@ -39,7 +39,7 @@ in reply to: {{ .RID }}

-{{ .HTPrecis }} +{{ .HTPrecis }}

{{ .HTPrecis }}

{{ .HTML }} {{ with .Place }}