-
-
Notifications
You must be signed in to change notification settings - Fork 449
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 basic lua scripting capabilities #4341
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some really minor stuff I found when trying this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
Co-Authored-By: nerix <[email protected]>
Co-Authored-By: nerix <[email protected]>
Co-Authored-By: nerix <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 25 out of 83. Check the log or trigger a new build to see more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 25 out of 58. Check the log or trigger a new build to see more.
Pull request checklist:
CHANGELOG.md
was updated, if applicableDescription
Aware chatterino getting plugins
Example plugin: https://github.com/mm2pl/chatterino-test-plugin
Place in:
Chatterino app directory -> Plugins -> test_plugin
, then typetesting
into any chat and notice a bunch of text pop up in the channel. Use/eval
to evaluate lua code in the context of the test plugin.Tree should look like this:
TODO:
http(another PR) -- will not touch APIs in this PREnable this functionality
switchbecause plugins can probably lead to executing binaries (which is probablyit's probably not that easy anymore, as direct bytecode execution and dedicated functions for this are blockednot desired xd)
print
with aqCInfo callended up doing qCDebug equivalent + apis to do proper loggingadd a description on what lua plugins can doadd an option to disable any plugins wanting to use dangerous apis, check it by defaultpermission system materialPlugins can usePlugins can only use the safe part of the stdlibio
,package
andos
libraries to read/write files, and execute binaries (most notable functions areio.popen
,os.execute
)package
that does not have the ability to load native shared libraries, it's nice to have multi-file plugins, you can use loadfile instead i guesscheck when lua's shared library loading is enabledit's impossible to load native code withoutrequire()
orpackage.loadlib
, both of which are blockedLater plans/ideas:
Unrelated changes: