From 741b1e0b9fc6eb45ea39dfca55747e35a841ccd5 Mon Sep 17 00:00:00 2001 From: Morgan Bazalgette Date: Sun, 4 Feb 2018 11:54:35 +0100 Subject: [PATCH] Require users to agree to license before starting the API --- main.go | 7 ++++++- vendor/vendor.json | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index e7a03a7..9989609 100644 --- a/main.go +++ b/main.go @@ -6,6 +6,7 @@ import ( "strings" "syscall" + "zxq.co/ripple/agplwarning" "zxq.co/ripple/rippleapi/app" "zxq.co/ripple/rippleapi/beatmapget" "zxq.co/ripple/rippleapi/common" @@ -30,6 +31,11 @@ func init() { var db *sqlx.DB func main() { + err := agplwarning.Warn("ripple", "Ripple API") + if err != nil { + fmt.Println(err) + } + fmt.Print("Ripple API") if Version != "" { fmt.Print("; git commit hash: ", Version) @@ -51,7 +57,6 @@ func main() { conf.DSN += c + "parseTime=true&charset=utf8mb4,utf8&collation=utf8mb4_general_ci" } - var err error db, err = sqlx.Open(conf.DatabaseType, conf.DSN) if err != nil { schiavo.Bunker.Send(err.Error()) diff --git a/vendor/vendor.json b/vendor/vendor.json index be64b14..95634eb 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -182,6 +182,12 @@ "revision": "77ef7867f23cd52e80dcf97e62447d3b36b1d26a", "revisionTime": "2016-10-17T20:25:41Z" }, + { + "checksumSHA1": "vTjp3tQOr8z8CNjZWwPzgR+t2qQ=", + "path": "zxq.co/ripple/agplwarning", + "revision": "d3a3d0ee424fcb0bd09a651354c1735285f59f8c", + "revisionTime": "2018-02-04T10:46:38Z" + }, { "checksumSHA1": "SI9tgNMlnMhxP7t6cAGuDjvoAHg=", "path": "zxq.co/ripple/ocl",