|
|
@ -29,9 +29,11 @@ func createUserFiles(username string) { |
|
|
|
// create necessary files if they dont exist
|
|
|
|
// create necessary files if they dont exist
|
|
|
|
os.OpenFile(fmt.Sprintf("%s/logfile", userpath), os.O_RDONLY|os.O_CREATE, 0666) |
|
|
|
os.OpenFile(fmt.Sprintf("%s/logfile", userpath), os.O_RDONLY|os.O_CREATE, 0666) |
|
|
|
os.OpenFile(fmt.Sprintf("%s/perm", userpath), os.O_RDONLY|os.O_CREATE, 0666) |
|
|
|
os.OpenFile(fmt.Sprintf("%s/perm", userpath), os.O_RDONLY|os.O_CREATE, 0666) |
|
|
|
os.OpenFile(fmt.Sprintf("%s/record", userpath), os.O_RDONLY|os.O_CREATE, 0666) |
|
|
|
|
|
|
|
os.OpenFile(fmt.Sprintf("%s/xlogfile", userpath), os.O_RDONLY|os.O_CREATE, 0666) |
|
|
|
os.OpenFile(fmt.Sprintf("%s/xlogfile", userpath), os.O_RDONLY|os.O_CREATE, 0666) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// create record symlink
|
|
|
|
|
|
|
|
exec.Command("ln", "-s", fmt.Sprintf("%s/record", config.NethackLauncher.HackDir), fmt.Sprintf("%s/record", userpath)).Run() |
|
|
|
|
|
|
|
|
|
|
|
// move in nhdat file if it does not exist
|
|
|
|
// move in nhdat file if it does not exist
|
|
|
|
exec.Command("cp", fmt.Sprintf("%s/nhdat", config.NethackLauncher.HackDir), userpath).Run() |
|
|
|
exec.Command("cp", fmt.Sprintf("%s/nhdat", config.NethackLauncher.HackDir), userpath).Run() |
|
|
|
} |
|
|
|
} |
|
|
|