created is_server & set_server functions

This commit is contained in:
Václav Šmejkal 2025-02-03 21:11:13 +01:00
parent 7fe2172ce9
commit ffcdfa0657
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
2 changed files with 14 additions and 0 deletions

View File

@ -89,6 +89,9 @@ void why2_chat_set_client_server_key(char *key); //SET KEY USED FOR ENCRYPTION B
char *why2_chat_get_client_server_key(void);
void why2_chat_deallocate_client_server_key(void);
void __why2_chat_set_server(why2_bool value); //IF PROGRAM IS SERVER-SIDE
why2_bool __why2_chat_is_server(void); //IF PROGRAM IS SERVER-SIDE
void __why2_set_asking_password(why2_bool value); //IF HASH SHOULD BE SENT INSTEAD OF NORMAL MESSAGE
why2_bool __why2_get_asking_password(void);

View File

@ -25,6 +25,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
why2_bool asking_password = 0;
why2_bool asking_username = 0;
why2_bool is_server = 0;
char *client_server_key = NULL;
void why2_chat_set_client_server_key(char *key)
@ -43,6 +44,16 @@ void why2_chat_deallocate_client_server_key(void)
client_server_key = NULL;
}
void __why2_chat_set_server(why2_bool value)
{
is_server = value;
}
why2_bool __why2_chat_is_server(void)
{
return is_server;
}
void __why2_set_asking_password(why2_bool value)
{
asking_password = value;