User:Xenon dichloride/Terminal: Difference between revisions
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
The following represents the initial state of the file system: | The following represents the initial state of the file system: | ||
~/ | ~/ | ||
boot/ # owner: su | |||
instances | |||
players/ | files | ||
users | |||
players | |||
commands | |||
winning | |||
commands/ # owner: su | |||
mk | |||
cp | |||
mv | |||
rm | |||
rn | |||
et | |||
run | |||
kill | |||
sudo | |||
players/ # owner: su | |||
== ~/boot/instances == | |||
The system must reboot to enact any changes to files within ~/boot/. Each week 3 new instances are created, with the contents of ~/boot/ directory at the end of the previous instance comprising the rules: | |||
Instance I: Sunday, Monday | |||
Instance II: Tuesday, Wednesday, Thursday | |||
Instance III: Friday, Saturday | |||
== ~/boot/files == | |||
A file is a document containing data such as text, formatting, tables or images. It is represented as a section Anything that can be added to an [[Main Page|Infinite Nomic Wiki]] page is valid content for a file. Every file has an owner, which is 'su' unless otherwise specified. | |||
== ~/boot/users == | |||
A user can own files and execute commands. Every player is a user. Additionally, 'su' can be used to reference the superuser, with absolute control of the system. 'e' can reference every user. | |||
== ~/boot/players/ == | |||
A player must be a member of the IN discord server. | |||
When a player joins, the following file is created at ~/players/ named {player name}: | |||
id = {Discord ID} | |||
is_player = true | |||
is_su = false | |||
privileges = 2 | |||
inventory = [] | |||
If that file already exists (the player has the same id), is_player = true. If multiple players would have files of the same name, subsequent player files have an integer appended to their name to represent their place when joining. When a player ceases being a player, is_player = false. If a player or ex-player leaves the server, they are no longer a player and their file is removed. | |||
== ~/boot/commands == | |||
A command is a formatted set of instructions that can be sent to alter the system. Every command must have a file in ~/commands/ with the name of the command as its name. The file must describe the syntax for the command and provide a description for what it should do. | |||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+Concatenation of ~/commands/ | ||
!Command | !Command | ||
!Alternative | !Alternative | ||
| Line 15: | Line 59: | ||
|mk | |mk | ||
|make | |make | ||
|mk {location or if blank: ~/} {name} {dir/file or if blank: file} {owner or if blank: you | |mk {location or if blank: ~/} {name} {dir/file or if blank: file} {owner or if blank: you} {if file: contents as attached .txt file or code block} | ||
|Creates a file or directory at the specified location. | |Creates a file or directory at the specified location. | ||
|- | |- | ||
| Line 31: | Line 75: | ||
|remove | |remove | ||
|rm {location} | |rm {location} | ||
|Deletes a file or directory | |Deletes a file or directory. | ||
|- | |- | ||
|rn | |rn | ||
| Line 37: | Line 81: | ||
|rn {location} {new name} | |rn {location} {new name} | ||
|Changes the name of a file or directory. | |Changes the name of a file or directory. | ||
|- | |- | ||
|et | |et | ||
| Line 51: | Line 90: | ||
| | | | ||
|run {file name} | |run {file name} | ||
|Executes the code in a file. | |Executes the code in a file. Actions performed by this code are considered to have been done by you. | ||
|- | |||
|kill | |||
| | |||
|kill {link to message or message id or if blank: all active} | |||
|Terminates an active process ran by you. | |||
|- | |- | ||
| | |sudo | ||
| | | | ||
| | |sudo {command} | ||
| | |Executes a command as su. All players may vote (👍 or 👎) on whether or not permission is granted. After 48 hours, permission is granted if there are more 👍 than 👎 votes. | ||
|} | |||
Each player may perform a number of commands per instance equivalent to their privileges value. | |||
A player cannot perform a command (excluding sudo) unless they are the owner of the file and directory being affected. | |||
== Winning == | == Winning == | ||
The first player to become a 'superuser' ( | The first player to become a 'superuser' (is_su = true) wins the cycle. | ||