replaced asking_password with boolean

This commit is contained in:
Václav Šmejkal 2024-09-01 20:57:29 +02:00
parent e94a401308
commit e06a237491
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
2 changed files with 9 additions and 7 deletions

View File

@ -23,6 +23,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
extern "C" {
#endif
#include <why2/flags.h>
//MACROS
#define WHY2_SA struct sockaddr
#define WHY2_CHAT_SERVER_PORT 1204 //PORT
@ -61,8 +63,8 @@ extern "C" {
#define WHY2_CHAT_CODE_SSQC WHY2_CHAT_CODE_SERVER_SIDE_QUIT_COMMUNICATION
//FUNCTIONS
void __why2_increment_asking_password(unsigned char asking_password); //IF HASH SHOULD BE SENT INSTEAD OF NORMAL MESSAGE
void __why2_reset_asking_password();
void __why2_set_asking_password(why2_bool value); //IF HASH SHOULD BE SENT INSTEAD OF NORMAL MESSAGE
why2_bool __why2_get_asking_password();
#ifdef __cplusplus
}

View File

@ -18,14 +18,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#include <why2/chat/flags.h>
unsigned char asking_password = 0;
why2_bool asking_password = 0;
void __why2_increment_asking_password()
void __why2_set_asking_password(why2_bool value)
{
asking_password++;
asking_password = value;
}
void __why2_reset_asking_password()
why2_bool __why2_get_asking_password()
{
asking_password = 0;
return asking_password;
}