Don't allow setting "first pincode" if pincode is already set (#8654)
This commit is contained in:
parent
29671fa5cd
commit
f3f8e63448
@ -309,8 +309,10 @@ int chclif_parse_pincode_setnew( int fd, struct char_session_data* sd ){
|
|||||||
if( charserv_config.pincode_config.pincode_enabled==0 || RFIFOL(fd,2) != sd->account_id ) {
|
if( charserv_config.pincode_config.pincode_enabled==0 || RFIFOL(fd,2) != sd->account_id ) {
|
||||||
set_eof(fd);
|
set_eof(fd);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
} else if (strnlen(sd->pincode, PINCODE_LENGTH) > 0) {
|
||||||
else {
|
set_eof(fd);
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
char newpin[PINCODE_LENGTH+1];
|
char newpin[PINCODE_LENGTH+1];
|
||||||
memset(newpin,0,PINCODE_LENGTH+1);
|
memset(newpin,0,PINCODE_LENGTH+1);
|
||||||
strncpy( newpin, RFIFOCP(fd,6), PINCODE_LENGTH );
|
strncpy( newpin, RFIFOCP(fd,6), PINCODE_LENGTH );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user