Compare commits

...

2 Commits

Author SHA1 Message Date
e34f92b0d8
renamed WHY2_CHAT_COMMAND_PM to WHY2_CHAT_COMMAND_DM
All checks were successful
Codacy Scan / Codacy Security Scan (push) Successful in 14s
Build WHY2-chat / test-why2 (./out/why2-chat-client, ./configure.sh, ubuntu-latest, ./out/why2-chat-server) (push) Successful in 1m49s
Test Project / test-project (./configure.sh, gdb -ex "run" -ex "quit" --batch, ubuntu-latest, ./test) (push) Successful in 2m6s
Test WHY2-core / test-why2 (why2, ./configure.sh, gdb -ex "run" -ex "quit" --batch, ubuntu-latest, ./out/why2-core-test, valgrind --leak-check=full --show-leak-kinds=reachable --track-origins=yes -s) (push) Successful in 2m12s
Test WHY2-logger / test-why2 (why2-logger, ./configure.sh, gdb -ex "run" -ex "quit" --batch, ubuntu-latest, ./out/why2-logger-test, valgrind --leak-check=full --show-leak-kinds=reachable --track-origins=yes -s) (push) Successful in 2m24s
these will be direct messages - unencrypted communication between two users
2025-01-30 21:20:59 +01:00
6f773bcecf
replaced RSA comment with ECC 2025-01-30 20:23:21 +01:00
2 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ extern "C" {
#define WHY2_CHAT_COMMAND_EXIT "exit" //QUIT THE PROGRAM CMD #define WHY2_CHAT_COMMAND_EXIT "exit" //QUIT THE PROGRAM CMD
#define WHY2_CHAT_COMMAND_HELP "help" //PRINT ALL COMMANDS #define WHY2_CHAT_COMMAND_HELP "help" //PRINT ALL COMMANDS
#define WHY2_CHAT_COMMAND_LIST "list" //LIST ALL CONNECTIONS #define WHY2_CHAT_COMMAND_LIST "list" //LIST ALL CONNECTIONS
#define WHY2_CHAT_COMMAND_PM "pm" //PRIVATE MESSAGES #define WHY2_CHAT_COMMAND_DM "dm" //DIRECT (UNENCRYPTED) MESSAGES
#define WHY2_CHAT_COMMAND_VERSION "version" //COMPARE CLIENT VERSION AND SERVER VERSION #define WHY2_CHAT_COMMAND_VERSION "version" //COMPARE CLIENT VERSION AND SERVER VERSION
//SHORTCUTS CAUSE I'M LAZY BITCH //SHORTCUTS CAUSE I'M LAZY BITCH

View File

@ -98,7 +98,7 @@ int main(void)
why2_check_version(); //CHECK FOR UPDATES why2_check_version(); //CHECK FOR UPDATES
why2_chat_init_client_config(); //CREATE client.toml CONFIGURATION why2_chat_init_client_config(); //CREATE client.toml CONFIGURATION
why2_chat_init_keys(); //CREATE RSA KEYS why2_chat_init_keys(); //CREATE ECC KEY
listen_socket = socket(AF_INET, SOCK_STREAM, 0); //CREATE SERVER SOCKET listen_socket = socket(AF_INET, SOCK_STREAM, 0); //CREATE SERVER SOCKET
char *line = NULL; char *line = NULL;
@ -188,14 +188,14 @@ int main(void)
"\nCommands:\n---------\n%s\n\n>>> ", "\nCommands:\n---------\n%s\n\n>>> ",
WHY2_CHAT_COMMAND_PREFIX WHY2_CHAT_COMMAND_HELP "\t\tPrints out all the commands. :)\n" WHY2_CHAT_COMMAND_PREFIX WHY2_CHAT_COMMAND_HELP "\t\tPrints out all the commands. :)\n"
WHY2_CHAT_COMMAND_PREFIX WHY2_CHAT_COMMAND_PM " <ID> <MSG>\tSends private message to user.\n" WHY2_CHAT_COMMAND_PREFIX WHY2_CHAT_COMMAND_DM " <ID> <MSG>\tSends direct message to user.\n"
WHY2_CHAT_COMMAND_PREFIX WHY2_CHAT_COMMAND_LIST "\t\tLists all users and their IDs.\n" WHY2_CHAT_COMMAND_PREFIX WHY2_CHAT_COMMAND_LIST "\t\tLists all users and their IDs.\n"
WHY2_CHAT_COMMAND_PREFIX WHY2_CHAT_COMMAND_VERSION "\tCheck server version.\n" WHY2_CHAT_COMMAND_PREFIX WHY2_CHAT_COMMAND_VERSION "\tCheck server version.\n"
WHY2_CHAT_COMMAND_PREFIX WHY2_CHAT_COMMAND_EXIT "\t\tExits the program." WHY2_CHAT_COMMAND_PREFIX WHY2_CHAT_COMMAND_EXIT "\t\tExits the program."
); );
fflush(stdout); fflush(stdout);
} else if (command(line, WHY2_CHAT_COMMAND_PM, &cmd_arg)) } else if (command(line, WHY2_CHAT_COMMAND_DM, &cmd_arg))
{ {
char *id; //PM RECEIVER char *id; //PM RECEIVER
char *msg; //something racial char *msg; //something racial