Enchat 3.0 - encrypted, decentralized, colorized, skynet-enabled pictochat

Started by LDDestroier, Oct 17, 2018, 05:50 PM

Previous topic - Next topic

LDDestroier

Uses SquidDev's implementation of AES asymmetric encryption.
Uses gollark's Skynet HTTP API.

After reviewing the previous version, I thought I could make it better, faster, stronger.
With this, I had decided that I would rewrite the entire program from scratch in it's third, probably final version:


To summarize, Enchat is an AES-encrypted chat program with a focus on decentralization, and various niceties that you don't see often in ComputerCraft programs, like text/background color changing and &k obfuscation, a plethora of commands, and integration with a few CC:Tweaked/Plethora-specific features, such as overlay glasses-enabled chat notifications.

Here are some features:
Spoiler
Color and formatting codes:
Spoiler
Chat messages can be formatted using color codes, specifically "&" for text, and "~" for background. Typing in &1 will make all proceeding text orange, and ~2 will make all proceeding text backgrounds pink.

In addition, formatting codes can be used to alter the text. Obfuscation (or 'krazy' text) can be made with "&k".
In the middle of a message, "&{" and "&}" can be used to ensure that nothing between the two codes will be formatted.
And, to reset formatting, you can use "&r". You can also use "~r" to reset background color.

Pictochat:
Spoiler
Not only text can be sent using Enchat 3.0! Image files can be sent, either made with the built-in basic paint program, or taken from the hard drive. NFP and NFT are supported.
Just use "/picto", press a key to change the character drawn, and the scroll wheel to change color (hold Left Shift and scroll for text color).

If you do send a premade picture, I know a pretty good image program...wink wink...

HTTP chat:
Spoiler
By default, gollark's Skynet (which enables chatting over HTTP) is disabled, but using the /set command, you can re-enable it, and messages will be received from across the world, even through a CC emulator!
Since Skynet uses websockets, it is required that you use SquidDev's CC:Tweaked, which thankfully is used in SwitchCraft.

Other:
Spoiler
Overlay Glasses notifications are shown to the top-left part of the screen if you are using Plethora's neural connector with overlay glasses. Never miss a message! (images sent with pictochat are upside down, though...will change)

Text is animated going from left to right while fading in by default. To disable this, do '/set doAnimate false'.

Chatbox support has been added, too! If a Computronics chatbox is connected (and the right internal setting is checked), player chat will be inputted into Enchat! In addition, incoming messages will be outputted through the chatbox. Command computers can take advantage of color and formatting codes, but a chatbox is necessary to read player chat.

List of commands:

/help    - Lists all the commands.
            If given a command name as an argument, tells you a bit about that command.
/exit    - gee I dunno man
/list    - Tries to get a list of all listening clients.
/key    - Tells you the current encryption key and channel.
            An argument can be used to set the key to something else.
/set    - Sets a config variable that is used within Enchat.
            Effects are immediate, and are saved to ".enchat/settings" automatically.
            Use without arguments for a list of all variables.
/me      - Phrases a message in the third person.
/big     - Say words with the bigfont API. Liable to lag up your game, so be careful with it.
/colors  - Shows you all the colors and their associated character.
/asay    - Sends a message with a specified animation.
            Use without arguments for the list of possible animations.
/msg     - Sends a message that will only be logged by a specific user, by name.
            You do not have to type out their formatting codes when specifying.
/palette - Changes the color of a specific aspect of Enchat.
            There are a few presets too, like "enchat2" or "chat.lua".
            Use preset "reset" to wipe your palette clean.
/picto   - Opens up a quick, dirty paint program to send an image out as a message.
           If you give it an argument, it will try to send an image with that filename.
          Supports NFP and NFT.
/nick    - Changes your current nickname.
          Supports color and formatting codes!
/whoami  - Tells you your current nickname.
/update  - Updates and exits Enchat.
/clear   - Clears the log, making it nice and squeaky clean.
/ping    - Flatly displays a message on the screen.
/shrug   - Sends a shrug, with an argument optionally replacing the face.


Get it here:
wget https://github.com/LDDestroier/enchat/raw/master/enchat3.lua enchat3.lua
 OR
pastebin get UVeAFRKe enchat3.lua
 OR
std ld enchat enchat3.lua
 OR
download the attached file

Attached file: [attach name=enchat3.txt type=text/plain]40[/attach]

Forum post copied over from the original forums.

Screenshots!
Spoiler
There are a lot of settings, and every time it changes, it saves to "/.enchat/settings" automatically.


Through the use of gollark's Skynet websockets API (only for CC:Tweaked), you can use the power of the internet to communicate with other Enchat3 clients!


With Plethora's overlay glasses with neural connector, Enchat3 will push messages as notifications to the top left part of the screen!


QuickMuffin8782

GOTTA GO FAST!!!! - Sunrise Studios now calling testers! Check the post!
Gitlab - Join my official discord! - SS Discord

LDDestroier

Quote from: QuickMuffin8782 on Jun 20, 2020, 06:54 AMWhy not use "pastebin put <dir>"?

I have no idea what that has to do with anything. Did you mean to comment on Progdor2?