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
Conversation
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.
This is missing the documentation part of things until the API is agreed upon, not due to a lack of motivation to add them ;) |
Seems fine to me. @McInkay, do you want to comment on this? |
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. |
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. |
Will wait for documentation PR before merging. Thanks @brunnre8 |
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