This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
StevenW129's profile picture

Locking Computers

Started by StevenW129, 17 September 2012 - 06:13 PM
StevenW129 #1
Posted 17 September 2012 - 08:13 PM
Hey,

I want to lock the computer from any use so like have a program running and it to remove the ability to type. Whats the code for that because I already know the code to stop people terminating it, also I would like the code to stop the rebooting of it if possible. Cheers!
GopherAtl #2
Posted 17 September 2012 - 08:15 PM
no way to override that from in cc. Not positive if it's even handled in the lua bios code or in java, as the idea is that terminate is a software-thing, like force-quitting a program, while reboot is a hardware thing, like physically turning the computer off and back on.
Velthos #3
Posted 17 September 2012 - 08:16 PM
Don't think there is a code to disallow rebooting/shutdown. But while the code is running, people shouldn't be able to type.
StevenW129 #4
Posted 17 September 2012 - 08:18 PM
I have a monitor with text in the startup and i wanna be able to remove the ability to type whiles its running
EmTeaKay #5
Posted 17 September 2012 - 08:21 PM
Use this to make it untypeable until the computer restarts.
sleep()
Or use this for an amount of seconds.
sleep(1)
ImNutzForCoal #6
Posted 19 September 2012 - 11:36 AM
type "edit reboot"

In program, type

term.clear()
term.setCursorPos(1,1)
print("Restarts are unavailable.")
Luanub #7
Posted 19 September 2012 - 11:48 AM
type "edit reboot"

In program, type

term.clear()
term.setCursorPos(1,1)
print("Restarts are unavailable.")

That won't work if they use ctrl+r or ctrl+s. There isn't anything you can really do to prevent someone using those since they are hard coded into CC.

The best thing to do is setup ctrl+t and disk boot protection on that computer. That way if the do shut it down or restart it the worse thing that can happen is the program starts over.