lisdude / toaststunt

A network accessible, multi-user, programmable, interactive system for the creation of LambdaMOO style MOOs / MUDs.
63 stars 27 forks source link

add allowance for include_args and include_argstr #41

Closed NathanTech7713 closed 3 years ago

NathanTech7713 commented 3 years ago

Hello

So recently I found myself wanting the ability to include argstr and args as part of what handle_uncaught_error and such receive, without necessarily getting the whole (potentially very spammy) output given with include_rt_variables. This pr adds the ability to enable include_rt_args and include_rt_argstr.

I've structured this based on how I saw include_rt-vars done, but if I missed something I am sincerely sorry!

]Hoping this is okay :)

NathanTech7713 commented 3 years ago

As an additional, never done a PR before so if I did something wrong or missed something, just let me know

tvdijen commented 3 years ago

Nothing wrong with your PR, but next time make a feature-branch on your own fork. The caveat of using master is that when you want to create another PR, and you've forgotten about this one in the meantime, you may add new and unrelated commits to this PR without realizing it!

Regarding your PR: I think it's getting a bit messy with all the added parameters and server options.. I think it would make sense to just always pass them, because it's all up to the implementation whether they are used or not within the $handle_uncaught_error() method. You have to use them with caution anyway if you don't want to end up with a user's password in your logs..

distantorigin commented 3 years ago

You can accomplish this inside the database by passing args/argstr, or by saving the player's last command somewhere. (Both have rather strong security implications, however.)