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 more plugin functionality #4329

Merged
merged 3 commits into from Nov 4, 2021
Merged

Add more plugin functionality #4329

merged 3 commits into from Nov 4, 2021

Conversation

brunnre8
Copy link
Member

The plugin functionality has some gaps that need to be fixed.
Our usual recommended plugin to look at is minidiggers thelounge-plugin-shortcut, however that thing was buggy and accessed TL internals as the official plugin API didn't expose the necessary methods.

That can be fixed :) MiniDigger/thelounge-plugin-shortcuts#31

Feedback appreciated if this is the proper way of doing it

Plugins need to be able to log messasages, say for errors.
Plugins need to be able to store persistant files, say settings or
databases or similar things.
Expose a standard location that gets created when the path is
accessed.
@brunnre8
Copy link
Member Author

This is missing the documentation part of things until the API is agreed upon, not due to a lack of motivation to add them ;)

@MaxLeiter
Copy link
Member

Seems fine to me. @McInkay, do you want to comment on this?

@MiniDigger
Copy link
Contributor

MiniDigger commented Oct 13, 2021

even tho I don't use thelounge anymore (I was forced to move off of irc for most stuff), this looks good to me.

only thing I could see interesting is a server config for the storage location of packages. like, not the packages itself, but the folder where packages would save data. I can see people wanting to change that, as this is something you would want to include in your backup routine (where as the package sources are resolved from npm for most deployments)

edit: actually, another idea (after looking at my plugins code): how about adding a "[package name]" prefix to all log messages? My plugin does this itself right now, but I can see others not doing that, and it would ease debugging stuff for admins to exactly see which package logged which message.

@brunnre8
Copy link
Member Author

I'm fine with the log stuff, although ot might get a bit noisy if the package name is long.

As for the storage location, preferably it should go into /var/lib but that's a separate issue one can address some other time I think.

For now, it is shoved into /etc just like the rest of it so backup scripts should pick it up.

@MaxLeiter MaxLeiter added this to Todo in Plugins via automation Oct 13, 2021
@MaxLeiter MaxLeiter moved this from Todo to In progress in Plugins Oct 13, 2021
@brunnre8 brunnre8 marked this pull request as ready for review October 14, 2021 10:24
@MaxLeiter
Copy link
Member

Will wait for documentation PR before merging. Thanks @brunnre8

@MaxLeiter MaxLeiter merged commit 59280cf into thelounge:master Nov 4, 2021
Plugins automation moved this from In progress to Done Nov 4, 2021
@MaxLeiter MaxLeiter added this to the 4.3.0 milestone Nov 4, 2021
@MaxLeiter MaxLeiter added the Type: Feature Tickets that describe a desired feature or PRs that add them to the project. label Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
Plugins
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants