chiark / gitweb /
Add servus.html from ~/public_html/irc
[irc.git] / servus.html
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html 
3      PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
4      "DTD/xhtml1-strict.dtd">
5 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
7 <head>
8 <title>Servus Documentation</title>
9 <style type="text/css">
10 body {background: white; color: black; text-align: left}
11 h1 {text-align: center; font-weight: bold; font-size: xx-large}
12 h2 {font-weight: bold; font-size: x-large}
13 h3, h4, h5, h6 {font-weight: bold; font-size: large}
14 li {list-style-type: circle}
15 hr {clear: both}
16 span.code {font-family: courier, monospace}
17 </style>
18 </head>
19
20 <body>
21 <h1>Servus Documentation</h1> 
22
23 <h2>Introduction</h2>
24 <p>Servus is one of the IRC bots on <span
25 class="code">#chiark</span>. This page documents the available
26 commands. A tarball of the source code is available, <a
27 href="bot.tar.gz">here</a>, though may be a little out of date.</p>
28
29 <h2>Invocation</h2>
30 <p>Servus may be invoked in-channel using either <span
31 class="code">!command</span> or <span
32 class="code">~command</span>. Alternatively, you may pass commands by
33 <span class="code">/msg</span>.
34 </p>
35
36 <h2>Commands</h2>
37
38 <ul>
39 <li><a href="#die">die</a></li>
40 <li><a href="#do">do</a></li>
41 <li><a href="#fish">fish</a></li>
42 <li><a href="#flirt">flirt</a></li>
43 <li><a href="#google">google</a></li>
44 <li><a href="#help">help</a></li>
45 <li><a href="#info">info</a></li>
46 <li><a href="#karma">karma</a></li>
47 <li><a href="#karmadel">karmadel</a></li>
48 <li><a href="#karmalist">karmalist</a></li>
49 <li><a href="#list">list</a></li>
50 <li><a href="#quiet">quiet</a></li>
51 <li><a href="#quit">quit</a></li>
52 <li><a href="#reload">reload</a></li>
53 <li><a href="#rot13">rot13</a></li>
54 <li><a href="#say">say</a></li>
55 <li><a href="#slash">slash</a></li>
56 <li><a href="#trout">trout</a></li>
57 <li><a href="#units">units</a></li>
58 </ul>
59
60 <hr />
61
62 <h3><a name="die">die</a></h3>
63 <p>This command must be invoked by <span class="code">/msg</span> only,
64 and is only effective if invoked by the bot's owner. The bot
65 exits.</p>
66
67 <h3><a name="do">do</a></h3>
68 <p>This command must be invoked by <span class="code">/msg</span>, and
69 is only effective if invoked by the bot's owner. The syntax is:<br />
70 <span class="code">/msg Servus do thing</span><br />...which results
71 in output to the channel of the form:<br />
72 <span class="code">* Servus/#chiark thing</span></p>
73
74 <h3><a name="fish">fish</a></h3>
75 <p>This command must be invoked by <span class="code">/msg</span>, and
76 is only effective if invoked by the bot's owner. It
77 returns some details about the internal state of the "fishpond" (a
78 simple rate-limiting feature for restricting the over-use of <span
79 class="code">trout</span>, <span class="code">flirt</span>, and <span
80 class="code">slash</span>).</p>
81
82 <h3><a name="flirt">flirt</a></h3>
83 <p>The syntax is:<br /> <span
84 class="code">flirt target</span><br /> Servus picks a flirt at random
85 from the flirts list (<span
86 class="code">/home/matthew/programming/irc/flirts</span> on rapun),
87 and substitutes "target" for "%s" in the flirt line. If this command
88 is invoked by <span class="code">/msg</span>, there is a 10% chance
89 of Servus stating who invoked it by adding "(but nick is their secret
90 admirer)" to the end of the flirt. Further suggestions for flirts
91 should be submitted by email; a list of current flirts may be found
92 online at <a
93 href="flirts">http://www.pick.ucam.org/~matthew/irc/flirts</a>.</p>
94
95 <h3><a name="google">google</a></h3>
96 <p>This command returns (either on-channel or by <span
97 class="code">/msg</span>) the "I'm feeling lucky" result of google
98 searching for the argument(s) of the "google" command.</p>
99
100 <h3><a name="help">help</a></h3>
101 <p>This command returns (either on-channel or by <span
102 class="code">/msg</span>) the location of this help file.</p>
103
104 <h3><a name="info">info</a></h3>
105 <p>This command returns (either on-channel or by <span
106 class="code">/msg</span>) information about the software version
107 running, which channel the bot is on, the bot's owner, and how many
108 items have karma recorded about them</p>
109
110 <h3><a name="karma">karma</a></h3>
111 <p>The syntax is:<br />
112 <span class="code">karma target</span><br />
113 It returns (either on-channel or by <span class="code">/msg</span>)
114 the current karma value for <span class="code">target</span> or "<span
115 class="code">target has no karma set.</span>" as appropriate. Items
116 gain or lose karma as the result of commands of the form:<br />
117 <span class="code">target++</span><br />or<br />
118 <span class="code">target--</span><br />
119 Note that if issued in-channel, the initial <span
120 class="code">!</span> or <span class="code">~</span> should not be
121 included. Karma targets must be one word only.</p>
122
123 <h3><a name="karmadel">karmadel</a></h3>
124 <p>The syntax is:<br /> <span
125 class="code">karmadel target</span><br /> <span
126 class="code">target</span>'s karma entry is deleted. An error message
127 is produced if <span class="code">target</span> has no karma set.</p>
128
129 <h3><a name="karmalist">karmalist</a></h3>
130 <p><span style="font-weight: bold">Do not use this
131 command</span>. Servus has too long a list of karma items, so
132 attempting to use this command will DoS the bot (it gets temporarily
133 removed from channel for excess flooding).</p>
134
135 <h3><a name="list">list</a></h3>
136 <p>This command returns (either on-channel or by <span
137 class="code">/msg</span>) a list of the commands Servus
138 understands</p> 
139
140 <h3><a name="quiet">quiet</a></h3>
141 <p>This command prevents the use of <span
142 class="code">trout</span>, <span class="code">flirt</span>, and <span
143 class="code">slash</span> for a short period of time (and will tell
144 anyone who attempts to do so that you have invoked this command).</p> 
145
146 <h3><a name="quit">quit</a></h3>
147 <p>This command is identical to <a href="#die">die</a>.</p>
148
149 <h3><a name="reload">reload</a></h3>
150 <p>This command may only be invoked by <span class="code">/msg</span>,
151 and only by the bot's owner. It causes Servus to re-load its <span
152 class="code">trout</span>, <span class="code">flirt</span>, and <span
153 class="code">slash</span> files, and to re-stock its fishpond.</p>
154
155 <h3><a name="rot13">rot13</a></h3>
156 <p>The syntax is:<br />
157 <span class="code">rot13 some text</span><br />
158 It returns by <span class="code">/msg</span>
159 the argument rot13d (so "<span class="code">fbzr grkg</span>" in this
160 case).</p>
161
162 <h3><a name="say">say</a></h3>
163 <p>This command must be invoked by <span class="code">/msg</span>, and
164 is only effective if invoked by the bot's owner. The syntax is:<br />
165 <span class="code">/msg Servus say thing</span><br />...which results
166 in output to the channel of the form:<br />
167 <span class="code">&lt;Servus&gt; thing</span></p>
168
169 <h3><a name="slash">slash</a></h3>
170 <p>The syntax is:<br /> <span
171 class="code">slash target1 / target2 </span><br /> Servus picks a slash at random
172 from the slashes list (<span
173 class="code">/home/matthew/programming/irc/slashes</span> on rapun),
174 and substitutes "target1" for the first "%s" and "target2 for the
175 second "%s" in the slash line. If this command
176 is invoked by <span class="code">/msg</span>, there is a 10% chance
177 of Servus stating who invoked it by adding "(while nick watches)" to
178 the end of the slash. Further suggestions for slashes should be
179 submitted by email; a list of current slashes may be found online at <a
180 href="slashes">http://www.pick.ucam.org/~matthew/irc/slashes</a>.</p>
181
182 <h3><a name="trout">trout</a></h3>
183 <p>The syntax is:<br /> <span
184 class="code">trout target</span><br /> Servus picks a trout at random
185 from the trouts list (<span
186 class="code">/home/matthew/programming/irc/trouts</span> on rapun),
187 and substitutes "target" for "%s" in the trout line. If this command
188 is invoked by <span class="code">/msg</span>, there is a 10% chance
189 of Servus stating who invoked it by adding "(at the instigation of
190 nick)" to the end of the trout. Further suggestions for trouts should
191 be submitted by email; a list of current trouts may be found online at
192 <a href="trouts">http://www.pick.ucam.org/~matthew/irc/trouts</a>.</p>
193
194 <h3><a name="units">units</a></h3>
195 <p>The syntax is:<br /> <span
196 class="code">units x unit1 as unit2</span><br />or:<br /> <span
197 class="code">units unit1 as unit2</span><br />or:<br /> <span
198 class="code">units x unit1 as ?</span><br />or:<br /> <span
199 class="code">units unit1 as ?</span><br />
200 The first two will give the first value in terms of the second unit;
201 the latter two forms convert the first value into SI units. This
202 command is implemented by calling <span class="code">units(1)</span>.</p>
203
204 <hr />
205 <address>
206   <a href="mailto:matthew@sel.cam.ac.uk">Matthew Vernon</a><br />
207   Cambridge, England
208 </address>
209  <p>
210 <a href="http://validator.w3.org/check/referer"><img
211         src="http://www.w3.org/Icons/valid-xhtml10"
212         alt="Valid XHTML 1.0!" height="31" width="88" /></a>
213 <a href="http://jigsaw.w3.org/css-validator/check/referer">
214 <img style="width:88px;height:31px"
215        src="http://jigsaw.w3.org/css-validator/images/vcss" 
216        alt="Valid CSS!" />
217 </a>
218 </p>
219 </body>
220 </html>
221