-
-
Notifications
You must be signed in to change notification settings - Fork 24
OSL ‐ Network
Network commands let you interact with the internet, and the origin account server, the accounts system requires the "account" permission.
The originOS server allows you to log into your accounts and sync things like your profile picture, username, accent colour and a few other things over any originOS installation, on any computer.
You can also store your files in your origin account so you can log in and get back everything you had on any other computer.
network "signup" [username] [plaintext_password]
You will gain access to all the other network commands to get info about yourself
- "Account Created Successfully" (The return value from the server when you successfully log in)
- "Account Password Cannot Be Null" (You didn't send a password)
- "Account Username Cannot Be Null" (You didn't send a username)
- "Username Already In Use" (An account already exists with that username)
- "New Account Exceeded 1kb" (Your username is wayyyyyyyyyy to long)
network "update" [key] [value]
You can set any key (doesn't have to be included below) to anything
Some keys are:
- "pfp" (url to an image that is used as your profile picture)
- "email" (It's your email)
- "accent" (This is the accent colour that is linked to your account)
- "Account Updated Successfully" (Your account has been updated with no issues)
- "Not Logged In" (You aren't logged into an origin account)
- "Update Value Must Be Less Than 500 Characters" (You tried to set a key to a value longer than 500 characters of text)
- "Account Cannot Be Bigger Than 10kb" (You tried to upload a key to a value that would push your account's total size over 10kb)
- "Unable to update:
["ips","last_login","max_size"]" (The key you tried to set is protected and not directly editable)
This command allows you to log into an origin account
network "login" [username] [password_as_plaintext]
- "Successful Login" (You are now logged in on the server)
- "Invalid Details" (The login details are wrong)
network "search" [username]
(Example received account object)
[
{
"username": "Mistium",
"pfp": "https://cdn.discordapp.com/avatars/603952506330021898/6ae8c3eb990a3989be5cc92892336d33",
"accent": "#57cdac"
}
]
- "Account Not Found" - if the account doesn't exist you will get this message
Returns a list of all accounts that have been logged in or created with your ip in the past
network "my_accounts"
(Example received account object)
[
{
"username": "Mistium",
"pfp": "https://cdn.discordapp.com/avatars/603952506330021898/6ae8c3eb990a3989be5cc92892336d33",
"accent": "#57cdac",
"ips":[your ip will be here along with all other ips that have logged into this account],
"last_login":"unicode timestamp of the last time this account was logged into"
},
{
"username": "Mist2",
"pfp": "https://cdn.discordapp.com/avatars/603952506330021898/6ae8c3eb990a3989be5cc92892336d33",
"accent": "#57cdac",
"ips":[your ip will be here along with all other ips that have logged into this account],
"last_login":"unicode timestamp of the last time this account was logged into"
}
]
Or if you have no previous accounts you will be returned []
This command requires only your current timestamp, it returns an integer of how many milliseconds it took to receive the ping back.
network ping
network "remove_myself"
This command removes your ip from your currently logged into account, this allows you to remove it from your login page on boot
- "Not Logged In" (You aren't logged into an origin account)
This command returns the data for the account you are currently logged into.
network "myself"
- "Not Logged In" (You aren't logged into an origin account)
(Example received account object)
{
"username":"Mist",
"password":"8b05d2620153e7dd3f1986fb732d895a",
"ips":["78.151.193.123"],
"accent":"#57cdac","last_login":1703515687862,
"max_size":"50000",
"pfp":"https://cdn.discordapp.com/avatars/603952506330021898/6ae8c3eb990a3989be5cc92892336d33"
}
All your other keys (such as ones set through the update command) will be in this json too
- "Not Logged In" (You aren't logged into an origin account)
originOS is a web desktop gui with a self contained file system, programming languages, internet system and a whole lot of stuff an os should be able to do Use originOS here