ircinch 2.4.4 → 2.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.standard.yml +1 -1
- data/CHANGELOG.md +13 -0
- data/CODE_OF_CONDUCT.md +7 -81
- data/README.md +39 -30
- data/docs/bot_options.md +207 -314
- data/docs/changes.md +293 -282
- data/docs/common_mistakes.md +50 -41
- data/docs/common_tasks.md +63 -42
- data/docs/encodings.md +28 -55
- data/docs/events.md +123 -131
- data/docs/getting_started.md +97 -102
- data/docs/logging.md +62 -70
- data/docs/migrating.md +145 -131
- data/docs/plugins.md +109 -3
- data/docs/readme.md +17 -15
- data/examples/README.md +78 -0
- data/examples/basic/autovoice.rb +14 -18
- data/examples/basic/google.rb +9 -22
- data/examples/basic/hello.rb +4 -3
- data/examples/basic/join_part.rb +8 -23
- data/examples/basic/memo.rb +26 -24
- data/examples/basic/msg.rb +6 -6
- data/examples/basic/seen.rb +17 -24
- data/examples/basic/urban_dict.rb +6 -26
- data/examples/basic/url_shorten.rb +8 -26
- data/examples/plugins/autovoice.rb +17 -16
- data/examples/plugins/custom_prefix.rb +4 -3
- data/examples/plugins/dice_roll.rb +13 -20
- data/examples/plugins/google.rb +7 -21
- data/examples/plugins/hello.rb +4 -3
- data/examples/plugins/hooks.rb +5 -6
- data/examples/plugins/join_part.rb +8 -21
- data/examples/plugins/lambdas.rb +5 -6
- data/examples/plugins/last_nick.rb +7 -6
- data/examples/plugins/msg.rb +6 -6
- data/examples/plugins/multiple_matches.rb +10 -11
- data/examples/plugins/own_events.rb +14 -19
- data/examples/plugins/seen.rb +23 -23
- data/examples/plugins/timer.rb +5 -6
- data/examples/plugins/url_shorten.rb +15 -19
- data/examples/settings.rb +19 -0
- data/examples/tiny_url.rb +41 -0
- data/ircinch.gemspec +5 -6
- data/lib/cinch/bot.rb +2 -3
- data/lib/cinch/channel.rb +4 -4
- data/lib/cinch/irc.rb +2 -2
- data/lib/cinch/message_queue.rb +2 -2
- data/lib/cinch/plugin.rb +1 -1
- data/lib/cinch/version.rb +1 -1
- metadata +270 -249
- data/lib/cinch/rubyext/float.rb +0 -5
data/docs/bot_options.md
CHANGED
|
@@ -1,454 +1,347 @@
|
|
|
1
|
-
#
|
|
2
|
-
# @markup kramdown
|
|
1
|
+
# Bot Options
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
Set options inside `bot.configure { |c| ... }`. Options below show the
|
|
4
|
+
defaults for this checkout. See the [configuration source](../lib/cinch/configuration/bot.rb)
|
|
5
|
+
and the [getting-started guide](getting_started.md) for a complete bot example.
|
|
5
6
|
|
|
6
|
-
## channels
|
|
7
|
-
Type
|
|
8
|
-
: Array<String>
|
|
7
|
+
## `channels`
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
- **Type** `Array<String>`
|
|
10
|
+
- **Default** `[]`
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
: Channels in this list will be joined upon connecting.
|
|
12
|
+
The bot joins these channels after registration, subject to [`delay_joins`](#delay_joins).
|
|
15
13
|
|
|
14
|
+
**Notes**
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
password to the channel's name, separated by a space, e.g.
|
|
20
|
-
`"#mychannel mypassword"`.
|
|
16
|
+
- To join a keyed channel from a handler, call `bot.join(channel_name, key)`.
|
|
17
|
+
Keep channel keys outside the source file.
|
|
21
18
|
|
|
22
|
-
## dcc
|
|
19
|
+
## `dcc`
|
|
23
20
|
|
|
24
|
-
### dcc.own_ip
|
|
25
|
-
Type
|
|
26
|
-
: String
|
|
21
|
+
### `dcc.own_ip`
|
|
27
22
|
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
- **Type** `String`
|
|
24
|
+
- **Default** `nil`
|
|
30
25
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
The IP address advertised for outgoing DCC transfers. With `nil`, IRCinch
|
|
27
|
+
uses the local address of the IRC socket. The recipient needs to be able to
|
|
28
|
+
reach the advertised address and listening port. See [DCC file transfers](common_tasks.md#dcc-file-transfers).
|
|
34
29
|
|
|
35
|
-
##
|
|
36
|
-
Type
|
|
37
|
-
: Number, Symbol
|
|
30
|
+
## `default_logger_level`
|
|
38
31
|
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
- **Type** `Symbol`
|
|
33
|
+
- **Default** `:debug`
|
|
41
34
|
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
The initial level used when the bot constructs its default logger. That logger
|
|
36
|
+
is created before the bot's configuration block runs. Set `bot.loggers.first.level`
|
|
37
|
+
to change it on an existing bot. See [logger levels](logging.md#logger-levels).
|
|
44
38
|
|
|
45
|
-
|
|
46
|
-
- This is especially useful in combination with the /cinch-identify/ plugin, which will trigger the `:identified` event.
|
|
39
|
+
## `delay_joins`
|
|
47
40
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
: String, Encoding
|
|
41
|
+
- **Type** `Numeric`, `Symbol`
|
|
42
|
+
- **Default** `0`
|
|
51
43
|
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
With a number, wait that many seconds after IRC registration before joining
|
|
45
|
+
configured channels. With a symbol, join when that event first fires on the
|
|
46
|
+
connection.
|
|
54
47
|
|
|
55
|
-
|
|
56
|
-
: This determines which encoding text received from IRC will have.
|
|
48
|
+
## `encoding`
|
|
57
49
|
|
|
50
|
+
- **Type** `String`, `Encoding`, or `:irc`
|
|
51
|
+
- **Default** `:irc`
|
|
58
52
|
|
|
59
|
-
|
|
60
|
-
- {file:docs/encodings.md More information on how Cinch handles encoding issues}
|
|
53
|
+
Controls decoding of incoming text and encoding of outgoing text. See [Encodings](encodings.md).
|
|
61
54
|
|
|
62
|
-
## local_host
|
|
63
|
-
Type
|
|
64
|
-
: String
|
|
55
|
+
## `local_host`
|
|
65
56
|
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
- **Type** `String`
|
|
58
|
+
- **Default** `nil`
|
|
68
59
|
|
|
69
|
-
|
|
70
|
-
: Which IP/host to bind to when connecting. This is useful for using
|
|
71
|
-
so called "vhosts".
|
|
60
|
+
The local address or hostname to bind when opening the IRC connection.
|
|
72
61
|
|
|
73
|
-
## max_messages
|
|
74
|
-
Type
|
|
75
|
-
: Fixnum
|
|
62
|
+
## `max_messages`
|
|
76
63
|
|
|
77
|
-
|
|
78
|
-
|
|
64
|
+
- **Type** `Integer`
|
|
65
|
+
- **Default** `nil`
|
|
79
66
|
|
|
80
|
-
|
|
81
|
-
: When an overlong message gets split, only `max_messages` parts will
|
|
82
|
-
be sent to the recipient.
|
|
67
|
+
Maximum number of parts sent per input line. `nil` sends all parts.
|
|
83
68
|
|
|
69
|
+
## `max_reconnect_delay`
|
|
84
70
|
|
|
85
|
-
|
|
86
|
-
-
|
|
71
|
+
- **Type** `Integer`
|
|
72
|
+
- **Default** `300`
|
|
87
73
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
74
|
+
Maximum reconnect delay in seconds. After an unsuccessful connection attempt,
|
|
75
|
+
IRCinch doubles the wait up to this cap. A successful registration resets the
|
|
76
|
+
backoff.
|
|
91
77
|
|
|
92
|
-
|
|
93
|
-
: `300`
|
|
78
|
+
## `messages_per_second`
|
|
94
79
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
delay between new attempts. This setting is the maximum number of
|
|
98
|
-
seconds to wait between two attempts.
|
|
80
|
+
- **Type** Positive `Numeric`
|
|
81
|
+
- **Default** `nil`
|
|
99
82
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
83
|
+
Estimated rate at which the server processes messages sent by the bot. `nil`
|
|
84
|
+
uses the [network default](../lib/cinch/network.rb). This estimate controls
|
|
85
|
+
outgoing throttling together with [`server_queue_size`](#server_queue_size).
|
|
103
86
|
|
|
104
|
-
|
|
105
|
-
: Network dependent
|
|
87
|
+
**Notes**
|
|
106
88
|
|
|
107
|
-
Description
|
|
108
|
-
: How many incoming messages the server processes per second. This is
|
|
109
|
-
used for throttling.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
### Notes
|
|
113
89
|
- If your bot gets kicked for excess flood, try lowering the value of
|
|
114
90
|
`messages_per_second`.
|
|
115
|
-
- See also:
|
|
116
|
-
|
|
117
|
-
## message_split_end
|
|
118
|
-
Type
|
|
119
|
-
: String
|
|
91
|
+
- See also: [`server_queue_size`](#server_queue_size)
|
|
120
92
|
|
|
121
|
-
|
|
122
|
-
: `" ..."`
|
|
93
|
+
## `message_split_end`
|
|
123
94
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
and the value of this option will be appended to all but the last
|
|
127
|
-
parts of the message.
|
|
95
|
+
- **Type** `String`
|
|
96
|
+
- **Default** `" ..."`
|
|
128
97
|
|
|
98
|
+
When a message is too long to be sent as a whole, it will be split
|
|
99
|
+
and the value of this option will be appended to all but the last
|
|
100
|
+
part. Use `nil` or `""` to omit the marker.
|
|
129
101
|
|
|
130
|
-
## message_split_start
|
|
131
|
-
Type
|
|
132
|
-
: String
|
|
102
|
+
## `message_split_start`
|
|
133
103
|
|
|
134
|
-
|
|
135
|
-
|
|
104
|
+
- **Type** `String`
|
|
105
|
+
- **Default** `"... "`
|
|
136
106
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
parts of the message.
|
|
107
|
+
When a message is too long to be sent as a whole, it will be split
|
|
108
|
+
and the value of this option will be prepended to all but the first
|
|
109
|
+
part. Use `nil` or `""` to omit the marker.
|
|
141
110
|
|
|
142
|
-
## modes
|
|
143
|
-
Type
|
|
144
|
-
: Array<String>
|
|
111
|
+
## `modes`
|
|
145
112
|
|
|
146
|
-
|
|
147
|
-
|
|
113
|
+
- **Type** `Array<String>`
|
|
114
|
+
- **Default** `[]`
|
|
148
115
|
|
|
149
|
-
|
|
150
|
-
|
|
116
|
+
User mode letters to set on the bot after registration, such as `["i"]`.
|
|
117
|
+
Set this with `c.modes = [...]` in a configuration block. The current
|
|
118
|
+
configuration class does not accept `:modes` through `[]` or `load`.
|
|
151
119
|
|
|
152
|
-
## nick
|
|
153
|
-
Type
|
|
154
|
-
: String
|
|
120
|
+
## `nick`
|
|
155
121
|
|
|
156
|
-
|
|
157
|
-
|
|
122
|
+
- **Type** `String`
|
|
123
|
+
- **Default** `"ircinch"`
|
|
158
124
|
|
|
159
|
-
|
|
160
|
-
: The nickname the bot will use.
|
|
125
|
+
The nickname the bot will use.
|
|
161
126
|
|
|
127
|
+
**Notes**
|
|
162
128
|
|
|
163
|
-
|
|
164
|
-
- If the nickname is in use, Cinch will append underscores until it
|
|
129
|
+
- If the nickname is in use, IRCinch will append underscores until it
|
|
165
130
|
finds a free nick.
|
|
166
131
|
- You really should set this option instead of using the default.
|
|
167
132
|
|
|
168
|
-
## nicks
|
|
169
|
-
Type
|
|
170
|
-
: Array<String>
|
|
171
|
-
|
|
172
|
-
Default value
|
|
173
|
-
: `nil`
|
|
174
|
-
|
|
175
|
-
Description
|
|
176
|
-
: This option overrules {file:docs/bot_options.md#nick `nick`} and allows Cinch
|
|
177
|
-
to try multiple nicks before adding underscores.
|
|
133
|
+
## `nicks`
|
|
178
134
|
|
|
135
|
+
- **Type** `Array<String>`
|
|
136
|
+
- **Default** `nil`
|
|
179
137
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
: String
|
|
138
|
+
A nonempty list of preferred nicknames, tried in order before appending
|
|
139
|
+
underscores. With `nil`, the bot starts with [`nick`](#nick).
|
|
183
140
|
|
|
184
|
-
|
|
185
|
-
: `nil`
|
|
141
|
+
## `password`
|
|
186
142
|
|
|
187
|
-
|
|
188
|
-
|
|
143
|
+
- **Type** `String`
|
|
144
|
+
- **Default** `nil`
|
|
189
145
|
|
|
146
|
+
Password sent with the IRC `PASS` command. For account authentication on a
|
|
147
|
+
server that supports SASL, see [`sasl`](#sasl).
|
|
190
148
|
|
|
191
|
-
|
|
192
|
-
- Some networks allow you to use the server password for
|
|
193
|
-
authenticating with services (e.g. NickServ).
|
|
149
|
+
## `ping_interval`
|
|
194
150
|
|
|
151
|
+
- **Type** `Numeric`
|
|
152
|
+
- **Default** `120`
|
|
195
153
|
|
|
196
|
-
|
|
197
|
-
Type
|
|
198
|
-
: Number
|
|
154
|
+
Interval in seconds between client `PING` commands.
|
|
199
155
|
|
|
200
|
-
|
|
201
|
-
: `120`
|
|
156
|
+
**Notes**
|
|
202
157
|
|
|
203
|
-
Description
|
|
204
|
-
: The server will be pinged every X seconds, to keep the connection
|
|
205
|
-
alive.
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
### Notes
|
|
209
158
|
- The ping interval should be smaller than
|
|
210
|
-
|
|
159
|
+
[`timeouts.read`](#timeoutsread) to prevent IRCinch from
|
|
211
160
|
falsely declaring a connection dead.
|
|
212
161
|
|
|
162
|
+
## `plugins`
|
|
213
163
|
|
|
214
|
-
|
|
164
|
+
### `plugins.plugins`
|
|
215
165
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
: Array<Class>
|
|
166
|
+
- **Type** `Array<Class>`
|
|
167
|
+
- **Default** `[]`
|
|
219
168
|
|
|
220
|
-
|
|
221
|
-
: `[]`
|
|
169
|
+
A list of plugins to register.
|
|
222
170
|
|
|
223
|
-
|
|
224
|
-
: A list of plugins to register.
|
|
171
|
+
**Notes**
|
|
225
172
|
|
|
226
|
-
|
|
227
|
-
#### Notes
|
|
228
173
|
- An example: `[Plugin1, Plugin2, Plugin3]` -- Note that we are adding
|
|
229
174
|
the plugin **classes** to the list.
|
|
230
175
|
|
|
231
|
-
### plugins.prefix
|
|
232
|
-
Type
|
|
233
|
-
: String, Regexp, Lambda
|
|
234
|
-
|
|
235
|
-
Default value
|
|
236
|
-
: `/^!/`
|
|
176
|
+
### `plugins.prefix`
|
|
237
177
|
|
|
238
|
-
|
|
239
|
-
|
|
178
|
+
- **Type** `String`, `Regexp`, `Proc`, or `nil`
|
|
179
|
+
- **Default** `/^!/`
|
|
240
180
|
|
|
181
|
+
Default prefix for plugin matchers. See [matching messages](plugins.md#matching-messages)
|
|
182
|
+
for overrides and how strings and regular expressions are combined.
|
|
241
183
|
|
|
242
|
-
### plugins.suffix
|
|
243
|
-
Type
|
|
244
|
-
: String, Regexp, Lambda
|
|
184
|
+
### `plugins.suffix`
|
|
245
185
|
|
|
246
|
-
|
|
247
|
-
|
|
186
|
+
- **Type** `String`, `Regexp`, `Proc`, or `nil`
|
|
187
|
+
- **Default** `nil`
|
|
248
188
|
|
|
249
|
-
|
|
250
|
-
: A suffix that will be appended to all plugin commands.
|
|
189
|
+
Default suffix for plugin matchers.
|
|
251
190
|
|
|
191
|
+
### `plugins.options`
|
|
252
192
|
|
|
193
|
+
- **Type** `Hash`
|
|
194
|
+
- **Default** `Hash.new {|h,k| h[k] = {}}`
|
|
253
195
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
: Hash
|
|
196
|
+
Options keyed by plugin class, with an empty hash for each class by default.
|
|
197
|
+
See [plugin configuration](plugins.md#configuration).
|
|
257
198
|
|
|
258
|
-
|
|
259
|
-
: `Hash.new {|h,k| h[k] = {}}`
|
|
199
|
+
## `port`
|
|
260
200
|
|
|
261
|
-
|
|
262
|
-
|
|
201
|
+
- **Type** `Integer`
|
|
202
|
+
- **Default** `6667`
|
|
263
203
|
|
|
204
|
+
The port the IRC server is listening on. Set the server's TLS port when
|
|
205
|
+
enabling [`ssl.use`](#ssluse).
|
|
264
206
|
|
|
265
|
-
|
|
266
|
-
- Information on plugins and options for those will be made available
|
|
267
|
-
in a separate document soon.
|
|
207
|
+
## `realname`
|
|
268
208
|
|
|
209
|
+
- **Type** `String`
|
|
210
|
+
- **Default** `"ircinch"`
|
|
269
211
|
|
|
270
|
-
|
|
271
|
-
Type
|
|
272
|
-
: Fixnum
|
|
212
|
+
The real name Cinch will connect with.
|
|
273
213
|
|
|
274
|
-
|
|
275
|
-
: `6667`
|
|
214
|
+
## `reconnect`
|
|
276
215
|
|
|
277
|
-
|
|
278
|
-
|
|
216
|
+
- **Type** `Boolean`
|
|
217
|
+
- **Default** `true`
|
|
279
218
|
|
|
219
|
+
Retry after connection failures or disconnects. Calling `bot.quit` disables
|
|
220
|
+
reconnection for that run.
|
|
280
221
|
|
|
281
|
-
##
|
|
282
|
-
Type
|
|
283
|
-
: String
|
|
222
|
+
## `sasl`
|
|
284
223
|
|
|
285
|
-
|
|
286
|
-
|
|
224
|
+
Set the username and password for an IRC account on a server that advertises
|
|
225
|
+
SASL. Use TLS for `PLAIN`, which encodes the password without encrypting it.
|
|
226
|
+
See [`ssl`](#ssl) for IRCinch's TLS settings and verification behavior.
|
|
287
227
|
|
|
288
|
-
|
|
289
|
-
: The real name Cinch will connect with.
|
|
228
|
+
### `sasl.username`
|
|
290
229
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
: Boolean
|
|
230
|
+
- **Type** `String`
|
|
231
|
+
- **Default** `nil`
|
|
294
232
|
|
|
295
|
-
|
|
296
|
-
: `true`
|
|
233
|
+
The username to use for SASL authentication.
|
|
297
234
|
|
|
298
|
-
|
|
299
|
-
: Should Cinch attempt to reconnect after a connection loss?
|
|
235
|
+
### `sasl.password`
|
|
300
236
|
|
|
301
|
-
|
|
237
|
+
- **Type** `String`
|
|
238
|
+
- **Default** `nil`
|
|
302
239
|
|
|
303
|
-
|
|
304
|
-
Type
|
|
305
|
-
: String
|
|
240
|
+
The password to use for SASL authentication.
|
|
306
241
|
|
|
307
|
-
|
|
308
|
-
: `nil`
|
|
242
|
+
### `sasl.mechanisms`
|
|
309
243
|
|
|
310
|
-
|
|
311
|
-
|
|
244
|
+
- **Type** `Array<Cinch::SASL::Mechanism>`
|
|
245
|
+
- **Default** `[Cinch::SASL::DhBlowfish, Cinch::SASL::Plain]`
|
|
312
246
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
247
|
+
Mechanisms to try in order. The bot tries the next one when the server sends
|
|
248
|
+
numeric `904` (authentication failed). For a network using `PLAIN`, set this
|
|
249
|
+
to `[Cinch::SASL::Plain]`.
|
|
316
250
|
|
|
317
|
-
|
|
318
|
-
: `nil`
|
|
251
|
+
## `server`
|
|
319
252
|
|
|
320
|
-
|
|
321
|
-
|
|
253
|
+
- **Type** `String`
|
|
254
|
+
- **Default** `"localhost"`
|
|
322
255
|
|
|
323
|
-
|
|
324
|
-
Type
|
|
325
|
-
: Array<Cinch::SASL::Mechanism>
|
|
256
|
+
The IRC server to connect to.
|
|
326
257
|
|
|
327
|
-
|
|
328
|
-
: `[Cinch::SASL::DhBlowfish, Cinch::SASL::Plain]`
|
|
258
|
+
## `server_queue_size`
|
|
329
259
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
attempted, until one was successful
|
|
260
|
+
- **Type** Positive `Integer`
|
|
261
|
+
- **Default** `nil`
|
|
333
262
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
: String
|
|
263
|
+
Estimated number of pending commands the server can queue for this connection.
|
|
264
|
+
`nil` uses the [network default](../lib/cinch/network.rb).
|
|
337
265
|
|
|
338
|
-
|
|
339
|
-
: `"localhost"`
|
|
266
|
+
**Notes**
|
|
340
267
|
|
|
341
|
-
Description
|
|
342
|
-
: The IRC server to connect to
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
## server_queue_size
|
|
346
|
-
Type
|
|
347
|
-
: Fixnum
|
|
348
|
-
|
|
349
|
-
Default value
|
|
350
|
-
: Network dependent
|
|
351
|
-
|
|
352
|
-
Description
|
|
353
|
-
: The number of incoming messages the server will queue, before
|
|
354
|
-
killing the bot for excess flood.
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
### Notes
|
|
358
268
|
- If your bot gets kicked for excess flood, try lowering the value of
|
|
359
269
|
`server_queue_size`.
|
|
360
|
-
- See also:
|
|
361
|
-
|
|
362
|
-
## ssl
|
|
363
|
-
|
|
364
|
-
### ssl.use
|
|
365
|
-
Type
|
|
366
|
-
: Boolean
|
|
270
|
+
- See also: [`messages_per_second`](#messages_per_second)
|
|
367
271
|
|
|
368
|
-
|
|
369
|
-
: `false`
|
|
272
|
+
## `ssl`
|
|
370
273
|
|
|
371
|
-
|
|
372
|
-
: Sets if SSL should be used
|
|
274
|
+
### `ssl.use`
|
|
373
275
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
: Boolean
|
|
276
|
+
- **Type** `Boolean`
|
|
277
|
+
- **Default** `false`
|
|
377
278
|
|
|
378
|
-
|
|
379
|
-
: `false`
|
|
279
|
+
Open the connection with TLS. Choose the network's TLS [`port`](#port) explicitly.
|
|
380
280
|
|
|
381
|
-
|
|
382
|
-
: Sets if the SSL certificate should be verified
|
|
281
|
+
### `ssl.verify`
|
|
383
282
|
|
|
283
|
+
- **Type** `Boolean`
|
|
284
|
+
- **Default** `false`
|
|
384
285
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
286
|
+
Enable verification of the server certificate chain. The current TLS
|
|
287
|
+
implementation does not check whether the certificate matches the server
|
|
288
|
+
hostname. See the [connection source](../lib/cinch/irc.rb) and
|
|
289
|
+
[Ruby OpenSSL documentation](https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-verify_hostname).
|
|
388
290
|
|
|
389
|
-
|
|
390
|
-
: `"/etc/ssl/certs"`
|
|
291
|
+
### `ssl.ca_path`
|
|
391
292
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
properly for {file:docs/bot_options.md#sslverify `ssl.verify`} to work.
|
|
293
|
+
- **Type** `String`
|
|
294
|
+
- **Default** `"/etc/ssl/certs"`
|
|
395
295
|
|
|
296
|
+
The path to a directory with certificates. This has to be set
|
|
297
|
+
properly for [`ssl.verify`](#sslverify) to work.
|
|
396
298
|
|
|
397
|
-
### ssl.client_cert
|
|
398
|
-
Type
|
|
399
|
-
: String
|
|
299
|
+
### `ssl.client_cert`
|
|
400
300
|
|
|
401
|
-
|
|
402
|
-
|
|
301
|
+
- **Type** `String`
|
|
302
|
+
- **Default** `nil`
|
|
403
303
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
authentication (see {http://www.oftc.net/oftc/NickServ/CertFP})
|
|
304
|
+
Path to a PEM file containing both the client certificate and its RSA private
|
|
305
|
+
key. Some networks use it for account authentication. See [OFTC’s CertFP guide](https://www.oftc.net/NickServ/CertFP/).
|
|
407
306
|
|
|
307
|
+
## `shared`
|
|
408
308
|
|
|
409
|
-
|
|
410
|
-
-
|
|
309
|
+
- **Type** `Hash`
|
|
310
|
+
- **Default** `{}`
|
|
411
311
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
: String
|
|
312
|
+
Per-bot data accessible to plugin instances through `shared`. Use
|
|
313
|
+
`synchronize` for updates that can run in concurrent handlers.
|
|
415
314
|
|
|
416
|
-
|
|
417
|
-
: `"cinch"`
|
|
315
|
+
## `strictness`
|
|
418
316
|
|
|
419
|
-
|
|
420
|
-
|
|
317
|
+
- **Type** `:forgiving` or `:strict`
|
|
318
|
+
- **Default** `:forgiving`
|
|
421
319
|
|
|
422
|
-
|
|
320
|
+
In strict mode, changing the bot's nickname or a channel topic, or kicking
|
|
321
|
+
a user, raises an exception when the supplied value exceeds the server's
|
|
322
|
+
advertised limit. In forgiving mode the request goes to the server.
|
|
423
323
|
|
|
424
|
-
|
|
425
|
-
Type
|
|
426
|
-
: Number
|
|
324
|
+
## `timeouts`
|
|
427
325
|
|
|
428
|
-
|
|
429
|
-
: `240`
|
|
326
|
+
### `timeouts.read`
|
|
430
327
|
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
connection will be considered dead.
|
|
328
|
+
- **Type** `Numeric`
|
|
329
|
+
- **Default** `240`
|
|
434
330
|
|
|
331
|
+
Socket read timeout in seconds. An expired read closes the connection.
|
|
435
332
|
|
|
436
|
-
### timeouts.connect
|
|
437
|
-
Type
|
|
438
|
-
: Number
|
|
333
|
+
### `timeouts.connect`
|
|
439
334
|
|
|
440
|
-
|
|
441
|
-
|
|
335
|
+
- **Type** `Numeric`
|
|
336
|
+
- **Default** `10`
|
|
442
337
|
|
|
443
|
-
|
|
444
|
-
|
|
338
|
+
Timeout in seconds for opening the TCP socket. The TLS handshake follows
|
|
339
|
+
afterward.
|
|
445
340
|
|
|
446
|
-
##
|
|
447
|
-
Type
|
|
448
|
-
: Symbol
|
|
341
|
+
## `user`
|
|
449
342
|
|
|
450
|
-
|
|
451
|
-
|
|
343
|
+
- **Type** `String`
|
|
344
|
+
- **Default** `"ircinch"`
|
|
452
345
|
|
|
453
|
-
|
|
454
|
-
|
|
346
|
+
The username sent with the IRC `USER` command. Set [`sasl.username`](#saslusername)
|
|
347
|
+
separately for SASL authentication.
|