from ptd
@ -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 {
@ -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)