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 plugin support #1422
Comments
having never touched node.js this might sound stupid but is it feasible to make an event driven api? it also would be cool to have an api to provide new options for context menus (on users, on channels, on networks, on messages, ...) those are the two things I would propose additionally to the things mentioned above. |
It shouldn’t be too hard for acting on anything coming in from the irc server. A regex filter plugin like setup would work. This framework can also be used then for ignoring people, auto op people and more automated things. |
I'm going to next implement a quick plugin support for custom commands. This will have an endpoint for the plugins to call that will take the name of the command and a function to call when the command is run, plus a way to send other commands in it's place (I guess we'll probably want this to be a decorator pattern so that it will return the command that is sent to the server rather than this being as well as, because obviously the custom command wouldn't make any sense to the server), probably in the same style as we would send to irc fw (so command and args as an array). It should ideally add the command to the client autocomplete, so that'll need to be passed from the server to the client on setup otherwise it'll have to rebuild the client which is ... not ideal. Any thoughts on this? |
Would it be possible to divide this work into parts so that we can help? |
As discussed in IRC, yes, the base server plugins exist. I'll be working on the plugin feature you want soon though. |
just sharing some ideas what apis that could be added:
|
You probably already know, but all 3 of these are essentially covered by #2757
Yeah, I want to focus on these 2 next. These will cover a large number of plugin ideas that people have.
This will be very easy because of my refactor a few months ago. I'm pretty sure I basically did it at one point but ... I can't find the code anymore. Dunno what I did with that. Ah well, I don't think it'll take too much work to add now. The rest look generally good. I think once we have a few of these done, we should probably close this ticket and turn them into individual ones. Otherwise this will just stay open forever. |
@MiniDigger There's also https://github.com/thelounge/thelounge/projects/4#card-8072845 which has a bunch of stuff. I need to go through your list and check if there's anything that isn't in the project. I don't think non-contributors can add things to boards, can they? |
Reviving this ticket. No I can't add new cards to boards. Since the command api did land now and I got to try it, these are my things that I find missing:
I also did update #1422 (comment) |
I presume it works if you refresh the page? I think all we need to do is just send an updated
Good shout. Although, regarding these, presuming this is for your plugin, remember that these commands are for all users, not per user, so if you are adding aliases, etc, all users will be able to see them. That's maybe not an issue for you, but something to bear in mind. |
Ahh, yeah, reloading works. |
Is this still on? I would love to be able to make URL preview plugins for various systems. |
Yes but no one has had time to work on it. PRs are welcome. |
Hey, I'm wanting to use the general events plugin structure to have push notifications via sms in something like twilio. Is there a good place to look for how i would start implementing this plugin structure so that such a plugin can be created? What I'm thinking is mainly server side event processing. |
Currently there aren't any recommendations since the plugin API is still very basic. |
(fwiw: I am not a JS dev so I have no clue if any of this is good, but I think its reasonably well organized) |
@richrd That was my intention, yes. I was planning to potentially include support for Telegram, Slack and Teams if I could, as I'd really like a nice central application to manage all my IM needs from without using a bunch of IRC bridges. I was hoping to make a nice little framework to be able to base further IM providers on. |
@Makeshift For now you're better off using bridge servers that can expose various services as IRC servers and connect to that. Like bitlbee. As it stands, there's currently no one that is willing to work on the plugin system. |
Just out of curiosity, do you know any good alternatives to bitlbee? I ran it for a while, but found it to way to confusing both at configuration and general operation as soon as you added a handful of protocols. |
I looked at adding support for postgres today, and I guess that's relevant for this issue. Is there any work for making a message store interface? Because I guess it would need to be generalized first. |
I want to monitor a channel for certain words from certain users and be able to log/do something with those events. It feels like I would need plugin support to be able to do this. Or is there some way to do this already that I'm not seeing? (Besides hacking it into the source myself) |
Yes, I also want such a plugin, on this basis, it can also send me notifications, I don’t know if there is such a plugin or API |
One important area missing from MiniDigger's handy summary is a file storage API (as distinct from message storage, which is already listed). See e.g. #4177 and #4850. |
There are many things that people want that we don't want to put in core. So we should have a plugin API to allow people to do these things.
I'm looking to start work on this, so I'm going to catalogue things that people will want to do with this. Once I have a first version working, I'll probably separate this into different issues for the other APIs that haven't been implemented.
Required APIs:
I'll flesh out the ideas for implementation later. Other ideas for APIs, stick them in comments on this post for just now, until we have the first plugin API.
I'll base the structure of a plugin on #1266
The text was updated successfully, but these errors were encountered: