DarkCastleMUD / DarkCastle

Dark Castle is a text-based MUD (multi-user dungeon) that was originally based on DIKU MUD around 1995. It has been running since then.
https://www.dcastle.org/
GNU Lesser General Public License v2.1
12 stars 11 forks source link

[BUG] vault access broken #244

Closed TehDreadPirateRoberts closed 1 week ago

TehDreadPirateRoberts commented 3 weeks ago

Describe the bug When you use vault access to add/remove someone from a vault, it will add the named char repeatedly, but will not remove them ever.

To Reproduce Steps to reproduce the behavior:

  1. vault access
  2. vault access

Expected behavior First time you type vault access it adds them to your vault, second time it removes them from your vault.

Screenshots The following people have access to your vault: Pirate Pirate Pirate Pirate Pirate Pirate Pirate

TehDreadPirateRoberts commented 3 weeks ago

No idea if this will help or not, but a few things I figured out while trying to troubleshoot this:

If the target player is offline you will see:

now has access to your vault. If the target player is online you will see: That person already has access to your vault. find_owner is checking online characters and if they aren't online it ends up returning nullptr to _bool has_vault_access(QString who, struct vault_data *vault)_ The check at vault.cpp on line 172 is always returning false. Just depending on if they are online or not, line 175 will either add them to the vault if they are offline or say they already have access if they are online.
jhhudso commented 1 week ago

fixed in latest commit