-
Notifications
You must be signed in to change notification settings - Fork 16
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
Update example code snippet provided in the Wiki, and corresponding example plugins #68
Comments
Yes, current state is unfortunate regarding the names of these two callbacks. Initially, only the Then the need for a new callback called during authentication arose for the Here is what I think I will do:
I will see what is best regarding plugin documentation / examples, but I will update them for sure with the new callbacks. Most plugins don't actually need to register their callbacks before lobby state is synchronized, because no action can be performed before lobby is synchronized anyway, and all synchronization data are already automatically processed by SPADS to provide the initial lobby state available through the |
Done in SPADS 0.13.35 ( 9947d12 ). Documentation for onLobbyLogin and onLobbySynchronized (formerly Documentation for addLobbyCommandHandler has been extended to add information about handlers being automatically removed when disconnections occur, and about the recommended usage of I also took the opportunity to add lobby state constants to ease lobby state management from plugins (see getLobbyState documentation). Finally, while I was there I also extended the documentation of the getParams configuration callback, to explain the difference between global plugin settings and preset plugin settings, and to explain how plugins can implement their own setting value checking functions instead of being restricted to the predefined types (previously undocumented feature). Regarding the plugin development tutorials/examples/templates, unfortunately I think I will have to wait until SPADS 0.13.35 is in the stable branch before updating them, because the new |
(I am unable to submit a PR for the Wiki, hence this issue)
This page:
... contains the following:
However, based on advice provided by Yaribz, some commands may be missed if handlers are registered in
onLobbyConnected(...)
instead ofonLobbyLogin(...)
. So, I believe this page should be updated to switch which callback is used.Similarly, the example plugins which use
onLobbyConnected(...)
should probably be updated as well:SPADS/plugins/tutorials/forbiddenwords.py
Line 55 in c11f4cc
SPADS/plugins/tutorials/ForbiddenWords.pm
Line 58 in c11f4cc
The text was updated successfully, but these errors were encountered: