Executing command as operator, or providing special permission to computers?
Started by NullSchritt, May 15 2013 02:00 AM
12 replies to this topic
#1
Posted 15 May 2013 - 02:00 AM
Hello, on my server I am using the stargates plugin, and I want to disable the dialing of gates by commands for regular players, so that they have to provide the required materials to create the address.
However at public gates I would like to offer dialing computers, that will load from a floppy disk, and get the name of the computer it is on (which will match the gate origin name), and then execute the dial command to connect the two gates.
My question is, is there a way to execute an operator only command with computercraft, or a way to make a special permission class specifically for computer craft, and if so, what would an example code/config look like?
Thanks!
However at public gates I would like to offer dialing computers, that will load from a floppy disk, and get the name of the computer it is on (which will match the gate origin name), and then execute the dial command to connect the two gates.
My question is, is there a way to execute an operator only command with computercraft, or a way to make a special permission class specifically for computer craft, and if so, what would an example code/config look like?
Thanks!
#2
Posted 15 May 2013 - 08:50 AM
Yes, use command blocks and wrap it as a peripheral (Also needs to be enabled in the configs)
Make sure you hide the command block too, they can be quite dangerous!
I would give an example but I can't remember the functions off the top of my head for command blocks.
Edit: http://computercraft...and_Block_(API)
Make sure you hide the command block too, they can be quite dangerous!
Edit: http://computercraft...and_Block_(API)
#3
Posted 15 May 2013 - 08:38 PM
Thanks for the link. Just a quick question though, wouldn't anyone with access to a terminal be able to hack it? (unless I somehow made it so it was impossible to edit the program)
Is there a way I can prevent the files on a pc from being edited without a password? To prevent users from hijacking the command block.
Is there a way I can prevent the files on a pc from being edited without a password? To prevent users from hijacking the command block.
#4
Posted 15 May 2013 - 08:50 PM
bedrock / permissions and os.pullEvent=os.pullEventRaw
#5
Posted 15 May 2013 - 08:57 PM
PixelToast, on 15 May 2013 - 08:50 PM, said:
bedrock / permissions and os.pullEvent=os.pullEventRaw
I meant from hacking the terminal, I just wanna know how to prevent them from exiting the default program and being able to edit the code, to write things to the command block they shouldn't.
#6
Posted 15 May 2013 - 09:00 PM
Quote
os.pullEvent=os.pullEventRaw
#8
#9
Posted 16 May 2013 - 01:57 AM
Hello, thanks for all the help so far, I've started to get together a basic program to do what I want. I seem to have stumbled onto one more problem.
When I call the command it will return 8-10 lines of text
ex:
This text is normally sent to the chat of the player who calls the command, is there any way to capture this text(to show on a monitor)?
When I call the command it will return 8-10 lines of text
ex:
Quote
Chevron 1 Engaged
Chevron 2 Engaged
Chevron 3 Engaged
Chevron 4 Engaged
Chevron 5 Engaged
Chevron 6 Engaged
Chevron 7 Engaged
Gate Connection [Active/Failed] (reason)
Chevron 2 Engaged
Chevron 3 Engaged
Chevron 4 Engaged
Chevron 5 Engaged
Chevron 6 Engaged
Chevron 7 Engaged
Gate Connection [Active/Failed] (reason)
This text is normally sent to the chat of the player who calls the command, is there any way to capture this text(to show on a monitor)?
#10
Posted 16 May 2013 - 09:07 AM
term.redirect(peripheral.wrap("side"))
thenterm.restore()afterwards
#11
Posted 16 May 2013 - 12:29 PM
darkrising, on 15 May 2013 - 08:50 AM, said:
Yes, use command blocks and wrap it as a peripheral (Also needs to be enabled in the configs)
Make sure you hide the command block too, they can be quite dangerous!
I would give an example but I can't remember the functions off the top of my head for command blocks.
Edit: http://computercraft...and_Block_(API)
Make sure you hide the command block too, they can be quite dangerous!
Edit: http://computercraft...and_Block_(API)
#12
Posted 16 May 2013 - 02:38 PM
D3matt, on 16 May 2013 - 12:29 PM, said:
darkrising, on 15 May 2013 - 08:50 AM, said:
Yes, use command blocks and wrap it as a peripheral (Also needs to be enabled in the configs)
Make sure you hide the command block too, they can be quite dangerous!
I would give an example but I can't remember the functions off the top of my head for command blocks.
Edit: http://computercraft...and_Block_(API)
Make sure you hide the command block too, they can be quite dangerous!
Edit: http://computercraft...and_Block_(API)
No but the computer can
#13
Posted 16 May 2013 - 04:32 PM
PixelToast, on 16 May 2013 - 09:07 AM, said:
term.redirect(peripheral.wrap("side"))
thenterm.restore()afterwards
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











