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

Send on channel refactoring #85

Merged
merged 8 commits into from
Apr 22, 2023
Merged

Send on channel refactoring #85

merged 8 commits into from
Apr 22, 2023

Conversation

S-S-X
Copy link
Member

@S-S-X S-S-X commented Feb 25, 2023

Improves event API a bit by making few things bit more uniform.

Changed signature of few event handlers that I think have not been used much outside of beerchat mod.

Moves more stuff away from beerchat core to modular extensions which makes configuration easier.

Copy link
Member

@BuckarooBanzay BuckarooBanzay left a comment

Choose a reason for hiding this comment

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

tested a bit, looks good 👍

@S-S-X
Copy link
Member Author

S-S-X commented Apr 22, 2023

I guess then rest of it can be tested in production. I've not done actual play testing but have tested / verified at least part of the logic offline.

This will cause duplication of some messages sent towards bridge but this is expected behavior and fixing it requires removing duplicate calls from other mods. For example this: https://github.com/mt-mods/beowulf/blob/f824064b0f68ed79c5a9f9b2405e7c890aa059f5/df_detect.lua#L232-L235

Should be changed to be like this (or similar but with message table):

		if has_beerchat then
-			beerchat.on_channel_message(beerchat.moderator_channel_name, "DF-Detect", msg)
			beerchat.send_on_channel("DF-Detect", beerchat.moderator_channel_name, msg)
		end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs testing
Projects
None yet
2 participants