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

Add a proper Channels API #4605

Closed
4 tasks done
Mm2PL opened this issue May 6, 2023 · 1 comment
Closed
4 tasks done

Add a proper Channels API #4605

Mm2PL opened this issue May 6, 2023 · 1 comment
Labels
discussion enhancement Feature: EXPERIMENTAL Plugins Stuff related to EXPERIMENTAL Lua plugin support
Milestone

Comments

@Mm2PL
Copy link
Collaborator

Mm2PL commented May 6, 2023

Checklist

  • I'm reporting a problem with Chatterino
  • I've verified that I'm running the most recent nightly build or stable release
  • I've looked for my problem on the wiki
  • I've searched the issues and pull requests for similar looking reports

Describe your issue

Currently the channels Lua API looks like this:

c2.send_msg(
  channel_name, -- string
  message -- string
) -- -> bool
c2.system_msg(
  channel_name, -- string
  message -- string
) -- -> bool

This has some issues:

  • it is not possible to check if a channel is open without sending something to it
  • it is not possible to use IRC channels
  • it might have issues with /watching? I don't know exactly as I don't use Windows and can't test with /watching.

I'd like something more like getOrAddChannel method of TwitchIrcServer. However such a system has a big problem: should Lua holding references still hold the channel open? If yes, the C++ part will probably be quite complex with massaging std::shared_ptrs to work with Lua's GC. Otherwise Lua scripts will be very complex with checking if the channel still exists.

Screenshots

No response

OS and Chatterino Version

Chatterino 2.4.3 DEBUG (commit bcd8028) built with Qt 5.15.9

@Mm2PL Mm2PL added enhancement discussion Feature: EXPERIMENTAL Plugins Stuff related to EXPERIMENTAL Lua plugin support labels May 6, 2023
@Mm2PL Mm2PL added this to the Plugins 1.0 milestone May 10, 2023
@Mm2PL
Copy link
Collaborator Author

Mm2PL commented Mar 1, 2024

This was done in #5141

@Mm2PL Mm2PL closed this as completed Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement Feature: EXPERIMENTAL Plugins Stuff related to EXPERIMENTAL Lua plugin support
Projects
None yet
Development

No branches or pull requests

1 participant