all repos — honk @ 8af86032d2e25672a16f80461aa433fed515ed04

my fork of honk

hide the danger zone for muggles
Ted Unangst tedu@tedunangst.com
Mon, 30 Sep 2019 22:28:53 -0400
commit

8af86032d2e25672a16f80461aa433fed515ed04

parent

61392bb62ed59e64b1b0a4d52692def09184b7c9

3 files changed, 14 insertions(+), 8 deletions(-)

jump to
M database.godatabase.go

@@ -381,7 +381,7 @@ expdate := time.Now().UTC().Add(-time.Duration(days) * 24 * time.Hour).Format(dbtimeformat)

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)")
M fun.gofun.go

@@ -71,13 +71,19 @@ zap := make(map[*Donk]bool)

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 = "" } - h.Open = "" - } else if h.Precis == "unspecified horror" { - h.Precis = "" + } 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.HTPrecis, _ = filt.String(h.Precis) h.HTML, _ = filt.String(h.Noise)
M views/honk.htmlviews/honk.html

@@ -39,7 +39,7 @@ {{ end }}

</header> <p> <details class="noise" {{ .Open }} > -<summary>{{ .HTPrecis }}</summary> +<summary>{{ .HTPrecis }}<p></summary> <p>{{ .HTPrecis }} <p>{{ .HTML }} {{ with .Place }}