A simple client for Micasend written in C++

Website : https://mcpp.softplus.fr
To compile it you will need to first install the dependencies:
- Ubuntu:
sudo apt install libcurl4-openssl-dev - Arch Linux:
sudo pacman -S curl
- Ubuntu:
sudo apt install cmake - Arch Linux:
sudo pacman -S cmakeThen you just need to run./cmakecompilein your local folder.
- You can add --release argument to optimize the program (it will be a bit slower)
- You can also add --fastcompile to compile on multiple cores
- Finally, you can also add --reset to reset compilation data from previous compilations
First, set settings like username, token... in config.json.
Then, you can run build/MicaClient, and now you should see the chat.
To send a message: just type it, and press Enter !

/help, /hto print a message containing all the commands available./exit, /qto exit MicaClient++/r, /ruto reply to a message (ru for unsafe mode)/uto send a message in unsafe mode./pto send a message in a group/gto change group vision (channel)
To reply to a message type /r x (with x the message ID to reply).
If you don't know it, only type /r, then choose the ID of the message you want to reply
Then, press [ENTER], and you will be able to write and send your answer !
By defalut, encryption message is active (you can see that messages are encrypted when there is an S on green background), but if you want to send a message in unsecure mode (message will be sent without encryption), you can type /u Unsecure message.
To reply in unsafe mode, type /ru x or /ru
You can also disable it in config.json, but it is not recommanded.
If you disable "enableEncryption" you won't be able to read Secured messages nor using private groups.
You can create private groups that will only be readable by some users.
To create a group, in config.json just add a new object to discussionGroupKeys section like in the example below:
"discussionGroupKeys": {
"a":{
"users": [ "MagicTest", "Michel" ],
"key":"thisIsAPrivateGroup"
}
},In this example the group is named "a" and its associated key is "thisIsAPrivateGroup".
Groups should not have spaces in their name !
/!\ Several users can create groups with the same name /!\
As you might not have the same key, you will see encrypted message from users that are not in your group.
- So to be sure private message are coming from the right group you must add the users that belong to your group.
- To receive messages from everyone in this group, add "*" in "users"
Then, just communicate the name and the key of the group you created to your members, and ask them to complete the "users" section too.
To filter message by group type /g groupname, and to go back to general /g.
Be careful, if you are in a group channel, and you send a message, it will only be sent to the group.

To send a message in a private group, just type /p groupname or /p and then type the group name.
Then just type your message and press [ENTER].
If you reply to a message of a group, it will automatically reply in the group.
You can start MicaClient++ with arguments !
-m, --moderatorenables moderator view to get messages ID (no you won't have rights to delete messages :p)--cfg path/to/a/config/file.jsonto load other config (usefull when you have several accounts)--allto print all the message history contained in backup.json (overwrites the theme "maxMessages" setting)
There are many more settings available in config.json
You can change MicaClient++ theme and language !
// configure a special path for your configuration,
"mcppConfigPath":"./",
// themes/defaultTheme.json by default
"themeFile":"themes/oldMicasendTheme.json",
// languages/en.json by default
"languageFile":"languages/fr.json",You can contribute by adding translations and/or creating new themes ! It's only json files !
// to only see messages sent by verified users
"blockUnVerifiedUsers":false,
// to block specific users
"blockedUsers": [ "blockedPseudo", "blockedPseudo2" ],You can also block users in discussion groups (for instance in public groups where someone tries to chat in your group with a wrong key)
"public":{
"users": [ "*" ],
"blocked": [ "blockedPseudoInPublicGroup" ],
"key":"thisIsaPublicGroup"
}In config.json you have a section named "settings" :
"settings": {
// to memorise old messages that are not available on the server anymore
"backupMessages":true,
}If you are using Default theme (or a theme that supports it), you can modify some simple settings in your theme. For instance in Default theme, here are the settings :
"settings": {
"showMessageID":true,
"showDate":false,
"showDeletedMessages":true,
"showOfflineMessages":true
},
// To print only a max quantity of messages, if you doesn't want to, put it to -1
"maxMessages":100,- add config importer (upgrade compatibility version)
- add /game with megamorpion implementation (submenus with /showgame /play /addgame /delgame)
- add /adduser for admins (with /showuser /upuser)
- fix last message deleted → the message before appears twice
- add /jg || /joingroup to add group in your configuration
- add /leavegroup to remove group from your configuration
- add a command to delete message from memory (maybe /delmsg on offline/deleted message → /forget)
- Enable token protection by default (password that encrypt token)
- add signature (normal/usecure) ?