-
-
Notifications
You must be signed in to change notification settings - Fork 13
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 -DBREBUILD Command #611
Conversation
- Add `-DBREBUILD` command line argument - Add support for rebuilding `BBSUSR.DAT/DB` from the internal MBBSEmu Database
- Move Resetting `BBSUSR` to after loading and verifying internal user records - Refactor `UserAccount` to add constructor to handle data casting, cleans up code
/// </summary> | ||
/// <param name="userName">Username the user will use to log into the system</param> | ||
/// <param name="userSex">Sex/Gender of the User (Only M/F supported)</param> | ||
public UserAccount(string userName, char userSex = 'M') : this() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably best to use an enum for userSex parameter to make it a compile time error rather than a runtime error, but not a huge thing
@@ -177,6 +187,18 @@ private void Run(string[] args) | |||
|
|||
break; | |||
} | |||
case "-DBREBUILD": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
command line parsing is getting crazy. I wrote some cool args/flags parsing code for Java, perhaps I should port it....
if (accounts.Count() != _accountBtrieve.GetRecordCount()) | ||
_logger.Warn($"MBBSEmu Database Account Count ({accounts.Count()}) does not match BBSUSR.DAT Account Count ({_accountBtrieve.GetRecordCount()})"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this likely isn't necessary since Insert should throw if unable to insert a record
-DBREBUILD
command line argumentBBSUSR.DAT/DB
from the internal MBBSEmu Database