all repos — honk @ e566c836e5325439e3bebac259ffd467d2758ff9

my fork of honk

nicer upgrade for zonkers
Ted Unangst tedu@tedunangst.com
Tue, 08 Oct 2019 01:31:37 -0400
commit

e566c836e5325439e3bebac259ffd467d2758ff9

parent

0b4c3ebb3466141a005eea5016899b94b38c6df0

1 files changed, 8 insertions(+), 0 deletions(-)

jump to
M upgradedb.goupgradedb.go

@@ -21,6 +21,7 @@ "log"

"os" "regexp" "strings" + "time" ) func doordie(db *sql.DB, s string, args ...interface{}) {

@@ -208,6 +209,7 @@ if err != nil {

log.Fatalf("can't query zonkers: %s", err) } filtmap := make(map[int64][]*Filter) + now := time.Now().UTC() for rows.Next() { var userid int64 var name, wherefore string

@@ -216,21 +218,27 @@ if err != nil {

log.Fatalf("error scanning zonker: %s", err) } f := new(Filter) + f.Date = now switch wherefore { case "zord": + f.Name = "hide " + name f.Text = name f.Hide = true case "zilence": + f.Name = "silence " + name f.Text = name f.Collapse = true case "zoggle": + f.Name = "skip " + name f.Actor = name f.SkipMedia = true case "zonker": + f.Name = "reject " + name f.Actor = name f.IncludeAudience = true f.Reject = true case "zomain": + f.Name = "reject " + name f.Actor = name f.IncludeAudience = true f.Reject = true