Skip to content
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

set_reserved_function_config() method for HiSockClient and HiSockServer #20

Open
SSS-Says-Snek opened this issue Dec 3, 2021 · 4 comments
Assignees
Labels
Difficulty - Hard Hard to implement/fix Enhancement - Medium A feature request that a small portion of users request

Comments

@SSS-Says-Snek
Copy link
Owner

Is your feature request related to a problem? Please describe.
When I saw sheepy use hisock, he used his implementation of the leave reserved function, because he sent some extra data. So, I realized that the functions would be useless to people who want to have their custom data sent on a particular reserved function event.

Describe the solution you'd like
So, I plan to add this method so that users can specify the data they want to send whenever a reserved function is triggered. The usage would probably be like server.set_reserved_function_config('leave', ['clt_info', 'my_data', 'more_data'])

@SSS-Says-Snek SSS-Says-Snek added Enhancement - Medium A feature request that a small portion of users request Difficulty - Medium Needs a bit of thinking to implement/fix labels Dec 3, 2021
@SSS-Says-Snek
Copy link
Owner Author

whaddya think @sheepy0125

@SSS-Says-Snek SSS-Says-Snek self-assigned this Dec 3, 2021
@SSS-Says-Snek SSS-Says-Snek moved this to In Progress in Stuff I need to do Dec 3, 2021
@SSS-Says-Snek SSS-Says-Snek moved this from In Progress to Postponed in Stuff I need to do Dec 8, 2021
@sheepy0125
Copy link
Collaborator

sheepy0125 commented Dec 12, 2021

It sounds cool!

Will this allow for multiple arguments being passed into a function? Can I make my own custom reserved function?
Something like:

server.set_reserved_function_config("create_sheep", ["client_info", "sheep_breed", "sheep_age", "sheep_mass"])
@SSS-Says-Snek.on("create_sheep")
def create_sheep(client_info, sheep_breed, sheep_age, sheep_mass):
   ...

@SSS-Says-Snek
Copy link
Owner Author

  1. yes, that's basically the point of the function; to provide extra data when a reserved function is called
  2. I don't think so, since hisock won't know when to call your "created reserved function" (given that when you mean "custom reserved function", you want hisock to call it on a new custom event

@SSS-Says-Snek
Copy link
Owner Author

I might be able to program something that allows you to create custom events though, but first I'll need to implement this :kekw:

@SSS-Says-Snek SSS-Says-Snek added Difficulty - Hard Hard to implement/fix and removed Difficulty - Medium Needs a bit of thinking to implement/fix labels Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty - Hard Hard to implement/fix Enhancement - Medium A feature request that a small portion of users request
Projects
Status: Postponed
Development

No branches or pull requests

2 participants