0

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.

SuperStormer
  • 4,997
  • 5
  • 25
  • 35
Lucas Baizer
  • 305
  • 2
  • 5
  • 13

2 Answers2

2

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:

Commands (API)

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

Restioson
  • 131
  • 1
  • 10
0

I believe that you can use this thing called the Chat Box.

http://ftbwiki.org/Chat_Box

It's not part of the default Computercraft, however. It is part of the Misc Peripherals mod I believe.

Lee Yi
  • 517
  • 6
  • 17