Commit graph

20 commits

Author SHA1 Message Date
Ty Conner
66d3b98339
Add options for database logging (#4352) 2025-08-23 13:32:35 -04:00
Coldeve-ACE
a31112ea51
Common Logging Changes (#4345)
* Update ShardDatabaseOfflineTools.cs

* Update Corpse.cs

* Update Creature_Death.cs

* Update Player_Death.cs

* Update Player_Inventory.cs

* Update WorldObject_Decay.cs

* Update HouseManager.cs

* Update Player_House.cs

* Update RecipeManager.cs

* Update Player_Allegiance.cs

* Update AuthenticationDatabase.cs

* Update ShardDatabase.cs

* Update WorldDatabase.cs

* Update Player_Magic.cs

* Update Player_Skills.cs

* Update Player_Attributes.cs

* Update Player_Combat.cs

* Update PhysicsObj.cs

* Update Player_Vitals.cs

* Update Player_Missile.cs

* Update Player_Melee.cs

* Update Monster_Melee.cs

* Update Session.cs
2025-08-11 22:38:12 -04:00
Mag-nus
9d70b48380
Improve logging overhead by fixing string interpolation (#4107)
* First batch

* Second batch

* another batch

* last batch hopefully

* fix
2024-03-13 02:38:39 +00:00
Ty Conner
f862d12a9c
Add support for account bans (#2917)
* Add support for account bans

* Update SentinelCommands.cs

* Update AdminCommands.cs

* Update SentinelCommands.cs

* Update SentinelCommands.cs

* Update SentinelCommands.cs

* Update SentinelCommands.cs
2020-04-12 18:47:17 -04:00
Ty Conner
3fc219e811
Add Creation/LastLogin IP/DateTime (#1985)
* Create 2019-06-10-00-Add_Fields_To_Account_Table.sql

* Scaffold new Account fields

* Add support for Create/LastLogin IP/DateTime

* Add CreateTime, CreateIP, LastLoginTime, LastLoginIp to finger output

* Update 2019-06-10-00-Add_Fields_To_Account_Table.sql

* update scaffolding

* changes as discussed

* BannedByAccountId

* sql changes as discussed

* update output

* Update AdminCommands.cs

* Update changelog.md
2019-07-06 16:12:24 -05:00
Ty Conner
1eb41f4ef7
Several Command Updates (#1614)
* GameMessageServerName tweak

* Update acehelp and acecommands

* Add pop command

* Add watchmen command

* Add finger command

* Update changelog

* .

* cleanup

* cleanup

* Load Account when Player is Onlined

* .

* Hide launcher pings and pongs.

* Add null check for @telereturn
2019-03-31 04:52:09 -05:00
zegegerslittlesis
cac4ea9e16 Update account authentication to use BCrypt. (#1468)
* Update account authentication to use BCrypt.

This updates account authentication to use the BCrypt hashing algorithm in place of SHA512 and the need for a separate password salt.

Bcrypt is also more secure since it uses a "Work Factor" to discourage password brute force attacks and the implementaition is much cleaner overall since the salt is randomly generated and added as part of the password hash itself, effectively protecting against rainbow table attacks.

The default WorkFactor is set to 10 which is the considered the current industry standard. A server owner can easily increase this value to whatever level of security they desire which in turn will make password verification slower and much harder to crack if ever brute forced by a hacker.

Furthermore, BCrypt is used in PHP's passwordHash() function so this change will open up some more account management possibilities through PHP registration scripts, especially CMS's and database bridging.

* Update AuthDbContext.cs

* Add Update script for Auth database

* Update Account / AuthDb for in-place migrations

* Fix a whitespace error

* Add 'passwd' and 'set-accountpassword' commands

* Update changelog

* Update AuthenticationBase.sql

Revert Auth Base to previous commit

* Update changelog.md
2019-03-08 13:41:23 -06:00
Mag-nus
eeaf9725e4
PlayerManager (#1103)
* PlayerManager initial checkin

* OfflinePlayer initial checkin

* More progress

* Comment out Console.WriteLine debug messages

* Add property dictionaries to OfflinePlayer

* IPlayer initial checkin

* Add allegiance vars to IPlayer

* Couple comments

* More progress

* Add more to IPlayer

* line endings fix

* More progress. Compiles. Friends list works again.

* Friend status updates now work (again)

* PlayerManager save OfflinePlayers every 1hr

* Bye bye legacy AllPlayers

* using cleanup

* Allegience switch to PlayerManager progress

* More Allegiance progress

* More progress

* More allegiance progress

* IPlayer adds

* Migrate inversefriends to PlayerManager

* Switch WorldManager GetPlayerByGuid over to PlayerManager

* WorldManager Find(ObjectGuid characterGuid) removed. Use PlayerManager instead

* WorldManager FindByPlayerName(string name) removed. Use PlayerManager instead

* PlayerManager thread safety switched to ReaderWriterLockSlim

* More progress

* ServerStatus added TotalAccountsCreated, TotalCharactersCreated

* No more Player access/management stuff in WorldManager. It's all in PlayerManager now

* Player.IsOnline is no more.

* Friends AppearOnline fix

* Handle dead session better to switch player from online to offline

* Remove adding the + to names in ChatChannels. Name property should be changed to not include +

* serverstatus total accounts and characters on same line

* Allegience initial fix, still more bugs though

* PlayerManager minor cleanup

uint should be faster key than ObjectGuid

Changed the dictionaries to private. We don't want anyone outside of this class referencing them.

* Thread safety added to LScape.get_landcell
2018-12-02 13:41:16 -06:00
Mag-nus
6cab5020e3
Nuget packages update (EF Core 2.1) + Lazy loading database issue in Shard (#914)
* Fixed an issue identified in EF 2.1 where context was being modified...

One of the nested loops was lazy loaded, then we iterated through those results pulling more records from the db. This raised an exception in EF 2.1.

The fix is to eager load the results that we iterate over.

Because of this, I've switched everything over to eager loading anyway. We don't do any lazy loading in ACE (we have no requirement to).

* NuGet packages updated + Changelog

* Couple cosmetic changes and null check fixes
2018-08-01 08:32:28 -05:00
Mag-nus
a162905b1c WIP: Switch Database system to Entity Framework Core, DB First (#633)
* AuthenticationDatabase switched to Entity Framework Core, DB First

* Adds AsNoTracking() for performance and implements CreateAccount() instead of AddAccount()

* woops

* Auth db no longer needs to be init, or inherit from Database

* test fix hopefully

* Database objects in ACE.Entity would no longer be required

* Major WIP

* more progress

* AuthenticationDatabase switched to Entity Framework Core, DB First

* Adds AsNoTracking() for performance and implements CreateAccount() instead of AddAccount()

* woops

* Auth db no longer needs to be init, or inherit from Database

* test fix hopefully

* Database objects in ACE.Entity would no longer be required

* Major WIP

* more progress

* include missing CharacterCreateInfo

* GetCharacters changes to show how we can use the propertybag for these values

* Lot of progress with the WorldObject code

* comment add

* add biota to CreateWorldObject for loading inv from db
2018-03-06 04:35:48 -05:00
Mag-nus
ef34494e7b
ACE.Database refactoring (#632)
* ACE.Database cosmetic cleanups before I try to fix performance

* ACE.Server: Arrange initialization of manager in a more appropriate order

* This removes the interfaces from ACE.Database

* World should be init before shard
2018-02-10 06:05:13 -06:00
Mag-nus
99fb8bcc55
All this does is cleanup a bunch of style issues that Resharper complains about (#629)
* Removed unused using statements

* Removed redudnant ToString()'s

* Removed some redundant type casts

* Removed redundant bool comparisons

* remove redundant initializers

* xml summary in invalid place switched to comments

* Use string interpolation

* use format separators

* Removed redundant parenths

* remove redundant else

* direct cast when safe

* redundant string interpolation

* xml summary fixes

* removed empty ctors

* fix modifier order

* Convert to auto property

* Convert some getters to method bodies

* use format separators

* changelog

* Auto-properties that can made to get-only

* fixed some references in XML comments

* remove redundant base()

* Revert "Auto-properties that can made to get-only"

This reverts commit 32a1225ce8.

* fix starter gear json

* Use collections count property

* simplify conditional ternary expression

* remove redundant return statements

* Constructors for abstract classes changed to protected

* Moved declarations to inner scopes

* Join declaration and assignments

* inline out variables

* Use enum extension methods instead of static methods

* inline out more variables

* more unused usings

* Remove specifying enums as ints
2018-02-09 06:46:49 -06:00
Ty Conner
6820723ebb Remove API and SecureAuth (#604)
* Remove API and SecureAuth

* Fix up some issues

* might need to rem this

* more clean up

* hmm

* Cleanup

* busted test

* remove debug code

* Add a few tests to simple verify AuthDB can create accounts and change accesslevel

* update test for security purpose

* more cleanup

* and more

* Remove leftover usermodified

* Update changelog.md

* Kill Random weenie search for now
2018-01-28 06:46:15 -06:00
Mogwai-TheFurry
610c2d0573 Authentication overhaul and API start (#543)
* WIP

* WIP - MVC app for weenie editor with auth overhaul in place

* removed redundant project

* more WIP.  commiting to rebase

* WIP.  API works, auth partially tied in, swagger works, api host works

* moved auth to a post with a body instead of get

* WIP.  auth fully works.  swagger UI supports auth model.

* added easier auth attribute, updated existing methods for consistency.  should PR this after a couple more hours

* stylecop cleanups

* WIP. commiting to get help with session and connection issues

* forgot to save some changes to a sql script

* got all the login issues squared away.  new auth system is done.

* WIP. getting an out of memory exception i cant track down

* WIP.  PacketInboundLoginRequets reads the JwtToken with 2 bonus (invalid) prepended characters

* updated ReadString32L to suck a little less.  i dont think this is 100% correct though.

* Authentication overhaul complete, APIs begun to support content editing

* appveyor cleanup

* appveyor cleanup, take 2

* appveyor cleanup, take 3

* appveyor cleanup, take 4

* Rename 2017-10-20-auth-overhaul.sql to 2017-10-20-00-auth-overhaul.sql

* Rename 2017-10-20-auth-overhaul-shard.sql to 2017-10-20-00-auth-overhaul-shard.sql

* Rename 2017-10-20-auth-overhaul-world.sql to 2017-10-20-00-auth-overhaul-world.sql

* Update MySqlInstall.bat
2017-10-21 13:32:06 -04:00
Charles
75eded7587 Reworked - Refactored debug commands, Expanded to spawn from weenie - started character orm. (#311)
* Initial work on characterorm / Cleaned up test code to create world objects from the database.

* Forgot the change log again.

* Missed SQL File

* Moved debug commands over to AdminCommands as requested.

* Added command attributes

* Update for merge

* Fixed AppVeyor issue I hope

* One more Time

* Still trying to fix appvoyer

* OMG

* Fixed correclty this time - I hope

* Wip

* Update for merge

* Update changelog.md
2017-05-02 10:25:35 -04:00
Mogwai-AC
b08cee50c5 testing stylecop build breakage 2017-04-04 15:25:38 -04:00
Ty Conner
2e0b674c82 Swapped account.Digest with account.Salt (#97) 2017-02-28 09:46:44 -05:00
Ty Conner
dfcf0f4309 Added UpdateAccountAccessLevel, GetAccountIdByName, accesslevel to preparedstatements, CreateAccount and GetAccountByName 2017-02-19 02:30:22 -05:00
Mag-nus
e33fe98ff8 Refactored namespaces, and a couple minor cosmetic cleanups here and there. 2017-02-16 19:54:23 -06:00
Scott Aday
2cbc848715 project separation and xp chart files 2017-02-13 23:17:58 -05:00
Renamed from Source/ACE/Database/AuthenticationDatabase.cs (Browse further)