being correct with user pronouns

This commit is contained in:
Václav Šmejkal 2024-08-28 11:42:13 +02:00
parent a5b6364c26
commit de4b6a39bf
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
3 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@ extern "C" {
#define WHY2_INVALID_POINTER (void*) 0xffffffffffffffff #define WHY2_INVALID_POINTER (void*) 0xffffffffffffffff
//(SERVER -> CLIENT) CODES //(SERVER -> CLIENT) CODES
#define WHY2_CHAT_CODE_ACCEPT_MESSAGES "code_000" //TELL CLIENT HE CAN SEND MESSAGES #define WHY2_CHAT_CODE_ACCEPT_MESSAGES "code_000" //TELL CLIENT THEY CAN SEND MESSAGES
#define WHY2_CHAT_CODE_PICK_USERNAME "code_001" //TELL CLIENT TO PICK USERNAME #define WHY2_CHAT_CODE_PICK_USERNAME "code_001" //TELL CLIENT TO PICK USERNAME
#define WHY2_CHAT_CODE_SERVER_SIDE_QUIT_COMMUNICATION "code_002" //TELL CLIENT TO END COMMUNICATION (just so they don't get segfault on server-side disconnect) #define WHY2_CHAT_CODE_SERVER_SIDE_QUIT_COMMUNICATION "code_002" //TELL CLIENT TO END COMMUNICATION (just so they don't get segfault on server-side disconnect)
#define WHY2_CHAT_CODE_INVALID_USERNAME "code_003" //haha #define WHY2_CHAT_CODE_INVALID_USERNAME "code_003" //haha

View File

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
user_pick_username = true # User will be prompted for his username on connect or will end up with default_username user_pick_username = true # User will be prompted for their username on connect or will end up with default_username
server_username = "server" # Username server will use server_username = "server" # Username server will use
default_username = "anon" # If user_pick_username is set to false, this will be used as client username default_username = "anon" # If user_pick_username is set to false, this will be used as client username

View File

@ -459,7 +459,7 @@ void *why2_communicate_thread(void *arg)
printf("User connected.\t\t%d\n", connection); printf("User connected.\t\t%d\n", connection);
send_welcome_packet(connection); //TELL USER HE ALL THE INFO HE NEEDS send_welcome_packet(connection); //TELL USER ALL THE INFO THEY NEED
//GET USERNAME //GET USERNAME
char *config_username = why2_chat_server_config("user_pick_username"); char *config_username = why2_chat_server_config("user_pick_username");
@ -489,7 +489,7 @@ void *why2_communicate_thread(void *arg)
while (invalid_username) while (invalid_username)
{ {
why2_deallocate(username); why2_deallocate(username);
if (usernames_n++ == server_config_int("max_username_tries")) //ASKED CLIENT WAY TOO FUCKING MANY TIMES FOR USERNAME, KICK HIM if (usernames_n++ == server_config_int("max_username_tries")) //ASKED CLIENT WAY TOO FUCKING MANY TIMES FOR USERNAME, KICK THEM
{ {
exiting = 1; exiting = 1;
goto deallocation; goto deallocation;
@ -533,7 +533,7 @@ void *why2_communicate_thread(void *arg)
if (invalid_username) if (invalid_username)
{ {
send_socket_deallocate(WHY2_CHAT_CODE_INVALID_USERNAME, why2_chat_server_config("server_username"), connection); //TELL THE USER HE IS DUMB AS FUCK send_socket_deallocate(WHY2_CHAT_CODE_INVALID_USERNAME, why2_chat_server_config("server_username"), connection); //TELL THE USER THEY ARE DUMB AS FUCK
continue; continue;
} }
@ -650,7 +650,7 @@ void *why2_communicate_thread(void *arg)
why2_deallocate(message); why2_deallocate(message);
} }
//IGNORE INVALID CODES, THE USER JUST GOT HIS LOBOTOMY DONE //IGNORE INVALID CODES, THE USER JUST GOT THEIR LOBOTOMY DONE
} else if (strncmp(decoded_buffer, WHY2_CHAT_COMMAND_PREFIX, strlen(WHY2_CHAT_COMMAND_PREFIX)) != 0) //IGNORE MESSAGES BEGINNING WITH '!' } else if (strncmp(decoded_buffer, WHY2_CHAT_COMMAND_PREFIX, strlen(WHY2_CHAT_COMMAND_PREFIX)) != 0) //IGNORE MESSAGES BEGINNING WITH '!'
{ {
//REBUILD MESSAGE WITH USERNAME //REBUILD MESSAGE WITH USERNAME