parent
2aa53ec46e
commit
565a286ff0
6
honk.go
6
honk.go
|
@ -373,7 +373,11 @@ func main() {
|
|||
}
|
||||
deluser(args[1])
|
||||
case "chpass":
|
||||
chpass()
|
||||
if len(args) < 2 {
|
||||
fmt.Printf("usage: honk chpass username\n")
|
||||
return
|
||||
}
|
||||
chpass(args[1])
|
||||
case "cleanup":
|
||||
arg := "30"
|
||||
if len(args) > 1 {
|
||||
|
|
8
util.go
8
util.go
|
@ -255,12 +255,8 @@ func deluser(username string) {
|
|||
doordie(db, "delete from users where userid = ?", userid)
|
||||
}
|
||||
|
||||
func chpass() {
|
||||
if len(os.Args) < 3 {
|
||||
fmt.Printf("need a username\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
user, err := butwhatabout(os.Args[2])
|
||||
func chpass(username string) {
|
||||
user, err := butwhatabout(username)
|
||||
if err != nil {
|
||||
elog.Fatal(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue