Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gender support #493

Merged
merged 7 commits into from
Jun 9, 2021
Merged

Add gender support #493

merged 7 commits into from
Jun 9, 2021

Conversation

tuday2
Copy link
Collaborator

@tuday2 tuday2 commented Jun 6, 2021

Closes #480

@tuday2 tuday2 marked this pull request as ready for review June 6, 2021 22:59
@tuday2
Copy link
Collaborator Author

tuday2 commented Jun 6, 2021

Ready for first review

@tuday2 tuday2 requested review from enusbaum and paladine and removed request for enusbaum June 6, 2021 22:59
@@ -516,8 +516,8 @@ private void DatabaseReset()
//Insert Into BBS Account Btrieve File
var _accountBtrieve = _serviceResolver.GetService<IGlobalCache>().Get<BtrieveFileProcessor>("ACCBB-PROCESSOR");
_accountBtrieve.DeleteAll();
_accountBtrieve.Insert(new UserAccount { userid = Encoding.ASCII.GetBytes("sysop"), psword = Encoding.ASCII.GetBytes("<<HASHED>>") }.Data, LogLevel.Error);
_accountBtrieve.Insert(new UserAccount { userid = Encoding.ASCII.GetBytes("guest"), psword = Encoding.ASCII.GetBytes("<<HASHED>>") }.Data, LogLevel.Error);
_accountBtrieve.Insert(new UserAccount { userid = Encoding.ASCII.GetBytes("sysop"), psword = Encoding.ASCII.GetBytes("<<HASHED>>"), sex = 77 }.Data, LogLevel.Error);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably do (byte)'M' here so it's easier to read


//Lookup current gender
var accountGender = accountBtrieve.GetRecord().ElementAt(213);
accountGender = accountGender == 70 ? (byte) 77 : (byte) 70;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(byte)'M' and (byte)'F' here so it's easier to read

@enusbaum enusbaum merged commit 01bb174 into mbbsemu:master Jun 9, 2021
@tuday2 tuday2 deleted the Add-Gender-Support branch June 26, 2021 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User gender is assumed to be male.
2 participants