Project

General

Profile

Idea-rpc » History » Version 1

David Demelier, 01/08/2019 10:08 AM

1 1 David Demelier
h1. Idea: RPC
2
3
* *Impact* : plugins and irccdctl
4
* *Status* : draft
5
* *Target version* : 3.1.0
6
7
h1. Background
8
9
Irccd plugins are currently fully standalone and can not interact with each other. Also, user is not able to control a plugin except by doing reload.
10
11
h1. Synopsis
12
13
The purpose of this project is to add a functionality in plugins to be able for the user to execute special commands.
14
15
Example: a hangman plugin is running, user wants to specify an explicit word for the next game. It can call irccdctl to set the next word.
16
17
h1. Proposed irccdctl usage
18
19
<pre>
20
$ irccdctl plugin-exec plugin command arg1 arg2 arg3 ... argn
21
</pre>
22
23
For hangman:
24
25
<pre>
26
$ irccdctl plugin-exec hangman set-next-word "joke"
27
</pre>
28
29
h1. Proposed network command
30
31
<pre><code class="json">
32
{
33
    "command": "plugin-exec",
34
    "plugin": "hangman"
35
    "function": "set-next-word"
36
    "args": [ "joke" ]
37
}
38
</code></pre>