Skip to content

Commit

Permalink
MultiServer: Add slot to SetReply packets (#3747)
Browse files Browse the repository at this point in the history
* Add slot to datastorage set response

* update docs as well
  • Loading branch information
NewSoupVi authored Jan 18, 2025
1 parent 8732974 commit 005a143
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions MultiServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1992,6 +1992,7 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict):
args["cmd"] = "SetReply"
value = ctx.stored_data.get(args["key"], args.get("default", 0))
args["original_value"] = copy.copy(value)
args["slot"] = client.slot
for operation in args["operations"]:
func = modify_functions[operation["operation"]]
value = func(value, operation["value"])
Expand Down
1 change: 1 addition & 0 deletions docs/network protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ Sent to clients in response to a [Set](#Set) package if want_reply was set to tr
| key | str | The key that was updated. |
| value | any | The new value for the key. |
| original_value | any | The value the key had before it was updated. Not present on "_read" prefixed special keys. |
| slot | int | The slot that originally sent the Set package causing this change. |

Additional arguments added to the [Set](#Set) package that triggered this [SetReply](#SetReply) will also be passed along.

Expand Down

0 comments on commit 005a143

Please sign in to comment.