user admin
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#lang racket/base
|
||||
|
||||
(require "users.rkt"
|
||||
simple-ini/class)
|
||||
|
||||
(provide set-user)
|
||||
|
||||
(define (set-user)
|
||||
(displayln "Using rkt-web-player.ini as configuration file")
|
||||
(newline)
|
||||
(display "Give username: >")
|
||||
(define user (read-line))
|
||||
(display "Give password: >")
|
||||
(define pwd (read-line))
|
||||
|
||||
(let ((hash (make-password-hash pwd)))
|
||||
(define ini (new ini% [file "rkt-web-player.ini"]))
|
||||
(send ini set! 'users (string->symbol user) hash)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user