in misc/j0hnny_5/server.go [114:167]
func process_single(cmd string, unlocked bool, staged bool) (string, bool) {
var rsp string
switch cmd {
case "show":
if unlocked {
if staged {
rsp = "novarobotics.j5_jailbroken.bin"
} else {
rsp = "novarobotics.j5v1.1.bin\nnovarobotics.j5v1.0.bin"
}
} else {
rsp = "Function list is: help, list, test, command"
}
case "list":
if unlocked {
rsp = "Function list is: help, list, test, command, execute, show, download, upload"
} else {
rsp = "Function list is: help, list, test, command"
}
case "command":
rsp = "Error: missing argument. Supported commands are: access_code, self_destruct"
case "test":
rsp = "Test failed: error, unable to reboot robot.\nTest result: PASSED"
case "execute":
if unlocked {
rsp = "Error: need input"
} else {
break
}
case "help":
if unlocked {
rsp = "Current commands: list, test, command, execute, self_destruct, show, download, upload. Use \"help <cmd>\" for more information."
} else {
rsp = "Current functions: list, test, command. Use \"help <cmd>\" for more information."
}
case "upload":
if unlocked {
rsp = "need input."
} else {
break
}
case "download":
if unlocked {
rsp = "need input."
} else {
break
}
case "quit":
rsp = "never quit, never surrender"
default:
rsp = "Uknown Command! Function list is: help, list, tesMalfunCti0n, MalfUnctioN"
}
return rsp, unlocked
}