I host a server and I was wondering: is there any way to run chat commands through ComputerCraft? I want to be able to run /tps
through the ComputerCraft terminal and then have it print out the TPS. Help would be greatly appreciated.
Thanks.
I host a server and I was wondering: is there any way to run chat commands through ComputerCraft? I want to be able to run /tps
through the ComputerCraft terminal and then have it print out the TPS. Help would be greatly appreciated.
Thanks.
In the new Computercraft 1.7 there is a new type of computer, the Command Computer. It allows the user to run commands the same way as shell.run("mkdir", "foo")
. It can only be obtained by ops, and can only directly be controlled (we are talking without using rednet and such) by ops
commands.exec(string command) -- Runs and outputs command output in chat.
commands.execAsync(string command) -- Quietly runs command without output.
Here is the wiki page:
But if we are talking 1.6.4 (Which almost all modpacks use) there is no "stock" version of doing that.
Hope it helps /Tyrerexus
I believe that you can use this thing called the Chat Box.
It's not part of the default Computercraft, however. It is part of the Misc Peripherals mod I believe.