Mercurial > irccd
comparison man/irccd-api-rule.3 @ 1002:ec5461750efd
man: add Irccd.Rule and Irccd.Hook manual pages
author | David Demelier <markand@malikania.fr> |
---|---|
date | Sat, 13 Feb 2021 22:15:16 +0100 |
parents | |
children | f06e9761cc90 |
comparison
equal
deleted
inserted
replaced
1001:b01f5d65d62a | 1002:ec5461750efd |
---|---|
1 .\" | |
2 .\" Copyright (c) 2013-2021 David Demelier <markand@malikania.fr> | |
3 .\" | |
4 .\" Permission to use, copy, modify, and/or distribute this software for any | |
5 .\" purpose with or without fee is hereby granted, provided that the above | |
6 .\" copyright notice and this permission notice appear in all copies. | |
7 .\" | |
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
15 .\" | |
16 .Dd @IRCCD_MAN_DATE@ | |
17 .Dt IRCCD-API-RULE 3 | |
18 .Os | |
19 .\" NAME | |
20 .Sh NAME | |
21 .Nm Irccd.Rule | |
22 .Nd irccd rule API | |
23 .\" SYNOPSIS | |
24 .Sh SYNOPSIS | |
25 .Vt Irccd.Rule.Accept | |
26 .Vt Irccd.Rule.Drop | |
27 .Fn Irccd.Rule.add "index, rule" | |
28 .Fn Irccd.Rule.clear | |
29 .Fn Irccd.Rule.list | |
30 .Fn Irccd.Rule.remove "index" | |
31 .\" DESCRIPTION | |
32 .Sh DESCRIPTION | |
33 This module let you inspect, manage and/or create or delete rules. | |
34 .Pp | |
35 Rules are created and obtained in JSON form with the following properties: | |
36 .Pp | |
37 .Bl -tag -compact -width "channels (array)" | |
38 .It Va action No (int) | |
39 Action to do for this rule. Must be either | |
40 .Fa Irccd.Rule.Accept | |
41 or | |
42 .Fa Irccd.Rule.Drop . | |
43 .It Va servers No (array) | |
44 List of servers to match as array of strings targeting server identifiers. | |
45 .It Va channels No (array) | |
46 List of channels to match | |
47 .It Va origins No (array) | |
48 List of origins (the full nickname and user hostname) to match. | |
49 .It Va events No (array) | |
50 List of events to match. See | |
51 .Xr irccd 1 | |
52 manual page for available values. | |
53 .It Va plugins No (array) | |
54 List of plugins to match as array of string targeting plugin identifiers. | |
55 .El | |
56 .\" METHODS | |
57 .Sh METHODS | |
58 .\" Irccd.Rule.add | |
59 The | |
60 .Fn Irccd.Rule.add | |
61 method adds the new | |
62 .Ar rule | |
63 at the given | |
64 .Ar index | |
65 which can be null, in this case the rule is added to the end. | |
66 .Pp | |
67 .\" Irccd.Rule.clear | |
68 The | |
69 .Fn Irccd.Rule.clear | |
70 method remove all rules. | |
71 .Pp | |
72 .\" Irccd.Rule.list | |
73 The | |
74 .Fn Irccd.Rule.list | |
75 method returns all rules as an array of JSON description. | |
76 .Pp | |
77 .\" Irccd.Rule.remove | |
78 The | |
79 .Fn Irccd.Rule.remove | |
80 function removes the rule at the given | |
81 .Ar index . | |
82 .\" EXCEPTIONS | |
83 .Sh EXCEPTIONS | |
84 .Bl -tag -width Er | |
85 .It Bq Er RangeError | |
86 Thrown in | |
87 .Fn Irccd.Rule.remove | |
88 if the | |
89 .Ar index | |
90 value was out of bounds. | |
91 .It Bq Er TypeError | |
92 If the rule action was invalid. | |
93 .El | |
94 .\" SEE ALSO | |
95 .Sh SEE ALSO | |
96 .Xr irccd-api 3 |