diff --git a/util.go b/util.go index 04a6880..9f3311a 100644 --- a/util.go +++ b/util.go @@ -44,6 +44,7 @@ import ( "net" "os" "os/signal" + "regexp" "strings" "golang.org/x/crypto/bcrypt" @@ -107,12 +108,16 @@ func initdb() { } r := bufio.NewReader(os.Stdin) - err = createuser(db, r) + initblobdb() + + prepareStatements(db) + + err = createserveruser(db) if err != nil { log.Print(err) return } - err = createserveruser(db) + err = createuser(db, r) if err != nil { log.Print(err) return @@ -153,9 +158,6 @@ func initdb() { setconfig("loginmsg", "