implemented max_message_length in message loop

This commit is contained in:
Václav Šmejkal 2024-02-25 20:26:13 +01:00
parent 13d4e2f480
commit 4d6b29e4c6
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -626,7 +626,7 @@ void *why2_communicate_thread(void *arg)
//TRIM MESSAGE
trim_string(&decoded_buffer);
if (decoded_buffer != NULL && strlen(decoded_buffer) != 0)
if (decoded_buffer != NULL && strlen(decoded_buffer) != 0 && strlen(decoded_buffer) <= (unsigned long) server_config_int("max_message_length"))
{
if (decoded_buffer[0] == '!') //COMMANDS
{