-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathabout.html
111 lines (100 loc) · 14.8 KB
/
about.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"/> <title>Maiden-Blocker</title> <meta name="viewport" content="width=device-width"/> <meta name="description" content="Module to allow blocking channels or users from issuing commands."/> <meta name="author" content="Nicolas Hafner <[email protected]>"/> <style type="text/css"> body{
max-width: 1024px;
margin: 0 auto 0 auto;
font-family: sans-serif;
color: #333333;
font-size: 14pt;
padding: 5px;
}
body>header{
display:flex;
align-items: center;
justify-content: center;
flex-direction: column;
max-width: 100%;
text-align: center;
}
body>header img{
max-width: 50%;
}
img{
max-width: 100%;
max-height: 100%;
}
code{
font-family: Consolas, Inconsolata, monospace;
}
a{
text-decoration: none;
color: #0055AA;
}
a img{
border: none;
}
#documentation{
text-align: justify;
}
#documentation pre{
margin-left: 20px;
overflow: auto;
}
#documentation img{
margin: 5px;
}
#symbol-index>ul{
list-style: none;
padding: 0;
}
#symbol-index .package>ul{
list-style: none;
padding: 0 0 0 10px;
}
#symbol-index .package .nicknames{
font-weight: normal;
}
#symbol-index .package h4{
display: inline-block;
margin: 0;
}
#symbol-index .package article{
margin: 0 0 15px 0;
}
#symbol-index .package article header{
font-size: 1.2em;
font-weight: normal;
}
#symbol-index .package .name{
margin-right: 5px;
}
#symbol-index .package .docstring{
margin: 0 0 0 15px;
white-space: pre-wrap;
font-size: 12pt;
}
@media (max-width: 800px){
body{font-size: 12pt;}
} </style> </head> <body> <header> <h1>maiden-blocker</h1> <span class="version">0.0.0</span> <p class="description">Module to allow blocking channels or users from issuing commands.</p> </header> <main> <article id="documentation"> <div><h2>About</h2> <p>This agent provides a facility to allow blocking and excluding channels, clients, users, or other parts from event or command processing. This is useful in case of spammers, or if some functionality does not provide an explicit kill switch, but must be turned off for a specific environment.</p> <h2>How To</h2> <p>Blocking happens over rules, which are a composition of clauses. The syntax is as most easily explained through some examples:</p> <pre><code>(channel "foo")
(<a href="http://l1sp.org/cl/or">or</a> (user "dios") (user "gott"))
(<a href="http://l1sp.org/cl/and">and</a> (prefix "::") (user "no-commands-user"))</code></pre> <p>Logical combinations can be made via <code><a href="http://l1sp.org/cl/and">and</a></code>, <code><a href="http://l1sp.org/cl/or">or</a></code>, and <code><a href="http://l1sp.org/cl/not">not</a></code>. Tests can be made with <code>channel</code>, <code>client</code>, <code>user</code>, <code>regex</code>, and <code>prefix</code>. You can also define additional clauses for these rules using <code><a href="#MAIDEN-BLOCKER:DEFINE-CLAUSE">define-clause</a></code>.</p> <p>Rules can also be defined and managed over the interface.</p> </div> </article> <article id="copyright"> <h2>Copyright</h2> <span>maiden-blocker</span> is licensed under the <span><a href="https://tldrlegal.com/search?q=Artistic">Artistic</a></span> license. © <span>Nicolas Hafner <[email protected]></span> . This library can be obtained on <a href="https://github.com/Shinmera/maiden">https://github.com/Shinmera/maiden</a>. </article> <article id="symbol-index"> <h2>Package Index</h2> <ul><li class="package"> <h3> <a name="MAIDEN-BLOCKER" href="#MAIDEN-BLOCKER">MAIDEN-BLOCKER</a> <span class="nicknames">(ORG.SHIRAKUMO.MAIDEN.AGENTS.BLOCKER)</span> </h3> <ul><li> <a name="MAIDEN-BLOCKER:ADD-RULE"> </a> <article> <header class="class"> <span class="type">class</span> <h4 class="name"><code><a href="#MAIDEN-BLOCKER:ADD-RULE">ADD-RULE</a></code></h4> </header> <pre class="docstring"/> </article> </li><li> <a name="MAIDEN-BLOCKER:BLOCK-CHANNEL"> </a> <article> <header class="class"> <span class="type">class</span> <h4 class="name"><code><a href="#MAIDEN-BLOCKER:BLOCK-CHANNEL">BLOCK-CHANNEL</a></code></h4> </header> <pre class="docstring"/> </article> </li><li> <a name="MAIDEN-BLOCKER:BLOCK-PREFIX"> </a> <article> <header class="class"> <span class="type">class</span> <h4 class="name"><code><a href="#MAIDEN-BLOCKER:BLOCK-PREFIX">BLOCK-PREFIX</a></code></h4> </header> <pre class="docstring"/> </article> </li><li> <a name="MAIDEN-BLOCKER:BLOCK-REGEX"> </a> <article> <header class="class"> <span class="type">class</span> <h4 class="name"><code><a href="#MAIDEN-BLOCKER:BLOCK-REGEX">BLOCK-REGEX</a></code></h4> </header> <pre class="docstring"/> </article> </li><li> <a name="MAIDEN-BLOCKER:BLOCK-USER"> </a> <article> <header class="class"> <span class="type">class</span> <h4 class="name"><code><a href="#MAIDEN-BLOCKER:BLOCK-USER">BLOCK-USER</a></code></h4> </header> <pre class="docstring"/> </article> </li><li> <a name="MAIDEN-BLOCKER:BLOCKER"> </a> <article> <header class="class"> <span class="type">class</span> <h4 class="name"><code><a href="#MAIDEN-BLOCKER:BLOCKER">BLOCKER</a></code></h4> </header> <pre class="docstring">This agent handles the blocking of users, channels, or commands based on flexible rules.</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:REMOVE-RULE"> </a> <article> <header class="class"> <span class="type">class</span> <h4 class="name"><code><a href="#MAIDEN-BLOCKER:REMOVE-RULE">REMOVE-RULE</a></code></h4> </header> <pre class="docstring"/> </article> </li><li> <a name="MAIDEN-BLOCKER:UPDATE-RULE"> </a> <article> <header class="class"> <span class="type">class</span> <h4 class="name"><code><a href="#MAIDEN-BLOCKER:UPDATE-RULE">UPDATE-RULE</a></code></h4> </header> <pre class="docstring"/> </article> </li><li> <a name="MAIDEN-BLOCKER:VIEW-RULE"> </a> <article> <header class="class"> <span class="type">class</span> <h4 class="name"><code><a href="#MAIDEN-BLOCKER:VIEW-RULE">VIEW-RULE</a></code></h4> </header> <pre class="docstring"/> </article> </li><li> <a name="MAIDEN-BLOCKER:VIEW-RULES"> </a> <article> <header class="class"> <span class="type">class</span> <h4 class="name"><code><a href="#MAIDEN-BLOCKER:VIEW-RULES">VIEW-RULES</a></code></h4> </header> <pre class="docstring"/> </article> </li><li> <a name="MAIDEN-BLOCKER:CLAUSE"> </a> <article> <header class="accessor"> <span class="type">accessor</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:CLAUSE">CLAUSE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME</code><code>)</code> </header> <pre class="docstring">Accessor to set or retrieve clause resolution functions.
See *CLAUSES*</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:RULE"> </a> <article> <header class="accessor"> <span class="type">accessor</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:RULE">RULE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME BLOCKER</code><code>)</code> </header> <pre class="docstring">Accessor to the rule instances that the blocker keeps.
See RULES
See BLOCKER</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:ADD-RULE"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:ADD-RULE">ADD-RULE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME RULE BLOCKER</code><code>)</code> </header> <pre class="docstring">Add a new rule to the blocker.
If a rule of the same name already exists, an
error is signalled.
See RULE</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:BLOCKED-P"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:BLOCKED-P">BLOCKED-P</a></code></h4> <code class="qualifiers"></code> <code class="arguments">EVENT BLOCKER</code><code>)</code> </header> <pre class="docstring">Returns whether the given event is blocked by the blocker.
See RULES
See MATCH-RULE</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:ENSURE-RULE"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:ENSURE-RULE">ENSURE-RULE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">RULE</code><code>)</code> </header> <pre class="docstring">Attempt to coerce the object into a proper rule form.
This will also make sure that the rule form is
a proper one, as it will simulate a matching
against a dummy event.
See ENSURE-RULE
See MATCH-RULE</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:MATCH-RULE"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:MATCH-RULE">MATCH-RULE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">RULE EVENT</code><code>)</code> </header> <pre class="docstring">Attempt to match the event against the rule.
The rule must be a properly parsed rule in list
form. If it contains an invalid clause, an error
is signalled.</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:REMOVE-CLAUSE"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:REMOVE-CLAUSE">REMOVE-CLAUSE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME</code><code>)</code> </header> <pre class="docstring">Remove a clause so that it is no longer recognised.
See *CLAUSES*</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:REMOVE-RULE"> </a> <article> <header class="function"> <span class="type">function</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:REMOVE-RULE">REMOVE-RULE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME BLOCKER</code><code>)</code> </header> <pre class="docstring">Remove a rule instance from the blocker.
See RULES
See BLOCKER</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:DEFINE-CLAUSE"> </a> <article> <header class="macro"> <span class="type">macro</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:DEFINE-CLAUSE">DEFINE-CLAUSE</a></code></h4> <code class="qualifiers"></code> <code class="arguments">&REST ARGS</code><code>)</code> </header> <pre class="docstring">Define a new clause resolution function.
The function should analyse the event and its
arguments and return whether the event passes
the clause or not.</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:ADD-RULE"> </a> <article> <header class="command"> <span class="type">command</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:ADD-RULE">block</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME RULE</code><code>)</code> </header> <pre class="docstring">Add a new blocking rule. The rule syntax allows AND/OR/NOT logical combinations and CHANNEL/CLIENT/USER/REGEX/PREFIX matchers. Use s-expression style syntax. Eg: (and (channel foo) (not (user bar)))</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:BLOCK-CHANNEL"> </a> <article> <header class="command"> <span class="type">command</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:BLOCK-CHANNEL">block channel</a></code></h4> <code class="qualifiers"></code> <code class="arguments">CHANNEL &KEY CLIENT NAME</code><code>)</code> </header> <pre class="docstring">Block a specific channel from all commands. The name of the rule will be the same as the channel.</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:BLOCK-PREFIX"> </a> <article> <header class="command"> <span class="type">command</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:BLOCK-PREFIX">block prefix</a></code></h4> <code class="qualifiers"></code> <code class="arguments">PREFIX &KEY CLIENT NAME</code><code>)</code> </header> <pre class="docstring">Block all commands that match a certain prefix. The name of the rule will be the same as the prefix string.</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:BLOCK-REGEX"> </a> <article> <header class="command"> <span class="type">command</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:BLOCK-REGEX">block regex</a></code></h4> <code class="qualifiers"></code> <code class="arguments">REGEX &KEY CLIENT NAME</code><code>)</code> </header> <pre class="docstring">Block all commands that match a certain regex. The name of the rule will be the same as the regex.</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:BLOCK-USER"> </a> <article> <header class="command"> <span class="type">command</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:BLOCK-USER">block user</a></code></h4> <code class="qualifiers"></code> <code class="arguments">USER &KEY CLIENT NAME</code><code>)</code> </header> <pre class="docstring">Block a specific user from all commands. The name of the rule will be the same as the user name.</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:REMOVE-RULE"> </a> <article> <header class="command"> <span class="type">command</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:REMOVE-RULE">unblock</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME</code><code>)</code> </header> <pre class="docstring">Remove a rule definition that was previously defined.</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:UPDATE-RULE"> </a> <article> <header class="command"> <span class="type">command</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:UPDATE-RULE">update block rule</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME RULE</code><code>)</code> </header> <pre class="docstring">Update an existing rule definition.</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:VIEW-RULE"> </a> <article> <header class="command"> <span class="type">command</span> <code>(</code><h4 class="name"><code><a href="#MAIDEN-BLOCKER:VIEW-RULE">view block rule</a></code></h4> <code class="qualifiers"></code> <code class="arguments">NAME</code><code>)</code> </header> <pre class="docstring">View the actual rule definition.</pre> </article> </li><li> <a name="MAIDEN-BLOCKER:VIEW-RULES"> </a> <article> <header class="command"> <span class="type">command</span> <h4 class="name"><code><a href="#MAIDEN-BLOCKER:VIEW-RULES">view block rules</a></code></h4> </header> <pre class="docstring">Show a listing of names of all the known block rules.</pre> </article> </li></ul> </li></ul> </article> </main> </body> </html>