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

SIGNAL_ACCOUNT_POST_LOGIN_FAIL is now properly used. Added a CUSTOM_S… #3324

Merged
merged 2 commits into from Nov 23, 2023

Conversation

volundmush
Copy link
Contributor

Brief overview of PR changes/additions

the SIGNAL_ACCOUNT_POST_LOGIN_FAIL signal wasn't being called anywhere, so that's been fixed.

A SIGNALS_CUSTOM object has been added to signals.py using a defaultdict to make for an easy event handler.

Motivation for adding to Evennia

Although I regret pushing for adding these signals all over the place (the custom variant using the defaultdict is a much more elegant approach), they ought to do what they say they do, so... fixing this oversight.

Other info (issues closed, discussion etc)

Copy link
Member

@Griatch Griatch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new SIGNALS_CUSTOM needs example usage description so people can actually make use of it without having to go to Django docs.

Comment on lines 95 to 97
# Used as a generic event emitter. Use to make your own signals easily in one place!
SIGNALS_CUSTOM: dict[str, Signal] = defaultdict(Signal)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could do with some example of how to use this.

Copy link
Member

@Griatch Griatch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Will probably need to update the signal docs at some point too.

@Griatch Griatch merged commit 1f25987 into evennia:main Nov 23, 2023
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants