comparison man/irccd.conf.5 @ 895:f0d6bc79aa32

irccd: implement hooks, closes #2342 @2h The hook mechanism is an alternative approach to plugins which allow the user to write lightweight scripts in any language.
author David Demelier <markand@malikania.fr>
date Thu, 05 Sep 2019 13:39:32 +0200
parents 54496ac51649
children 32b0397f0992
comparison
equal deleted inserted replaced
891:6704e7ded799 895:f0d6bc79aa32
206 is appended with the appropriate plugin name when used. 206 is appended with the appropriate plugin name when used.
207 .Pp 207 .Pp
208 The section is redefinable per plugin basis using the 208 The section is redefinable per plugin basis using the
209 .Va [paths.<plugin>] 209 .Va [paths.<plugin>]
210 syntax. 210 syntax.
211 .\" [plugins]
211 .Ss plugins 212 .Ss plugins
212 This section is used to load plugins. 213 This section is used to load plugins.
213 .Pp 214 .Pp
214 Just add any key you like to load a plugin. If the value is not specified, the 215 Just add any key you like to load a plugin. If the value is not specified, the
215 plugin is searched through the standard directories, otherwise, provide the full 216 plugin is searched through the standard directories, otherwise, provide the full
216 path (including the .js extension). 217 path (including the .js extension).
217 .Pp 218 .Pp
218 Warning: remember to add an empty string for searching plugins. 219 Warning: remember to add an empty string for searching plugins.
220 .\" [hooks]
221 .Ss hooks
222 This sections stores every hooks in key-value pairs. The option key denotes the
223 hook id and the value must be a path to the actual hook file.
219 .\" [transport] 224 .\" [transport]
220 .Ss transport 225 .Ss transport
221 This section defines transports that are used to communicate through clients 226 This section defines transports that are used to communicate through clients
222 connected to irccd and to perform requests to irccd. 227 connected to irccd and to perform requests to irccd.
223 .Pp 228 .Pp
353 [rule] 358 [rule]
354 servers = "localhost" 359 servers = "localhost"
355 channels = "#staff" 360 channels = "#staff"
356 plugins = "reboot" 361 plugins = "reboot"
357 action = accept 362 action = accept
363
364 # Example of hooks
365 # This create an hook named "mail" with the given path.
366 [hooks]
367 mail = "/path/to/mail.py"
358 .Ed 368 .Ed
359 .\" SEE ALSO 369 .\" SEE ALSO
360 .Sh SEE ALSO 370 .Sh SEE ALSO
361 .Xr irccd 1 371 .Xr irccd 1
362 .\" AUTHORS 372 .\" AUTHORS