Mercurial > irccd
comparison doc/src/irccdctl.conf.md @ 607:bb9771fb5f44
Docs: rework documentation
- Change directories,
- Remove handwritten manual pages.
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 08 Dec 2017 20:11:22 +0100 |
parents | |
children | ebe561276c33 |
comparison
equal
deleted
inserted
replaced
606:4f5f306d13ac | 607:bb9771fb5f44 |
---|---|
1 % irccdctl.conf | |
2 % David Demelier | |
3 % 2017-12-08 | |
4 | |
5 The `irccdctl` utility use the same configuration file syntax and paths, see the | |
6 manual of irccd.conf file for more information. | |
7 | |
8 # The general section | |
9 | |
10 This section defines the global irccdctl parameters. | |
11 | |
12 The available options: | |
13 | |
14 - **verbose**: (bool) enable verbose message (Optional, default: false). | |
15 | |
16 ## Example | |
17 | |
18 ```ini | |
19 [general] | |
20 verbose = true | |
21 ``` | |
22 | |
23 # The connect section | |
24 | |
25 The section socket permit irccdctl to connect to a specific irccd transport, | |
26 only one must be defined. Just like transports you can connect to Unix or | |
27 internet sockets. | |
28 | |
29 The available options: | |
30 | |
31 - **type**: (string) connection type: "ip" or "unix". | |
32 - **password**: (string) an authentication password (Optional, default: none). | |
33 | |
34 The options for **ip** type: | |
35 | |
36 - **host**: (string) host to connect, | |
37 - **port**: (int) port number, | |
38 - **family**: (string) internet family: ipv6 or ipv4 (Optional, default: ipv4). | |
39 | |
40 The options for **unix** type: | |
41 | |
42 - **path**: (string) The file path to the socket. | |
43 | |
44 ## Example for internet transports | |
45 | |
46 ```ini | |
47 [connect] | |
48 type = "internet" | |
49 host = "localhost" | |
50 port = "9999" | |
51 family = "ipv6" | |
52 ``` | |
53 | |
54 ## Example for unix transports | |
55 | |
56 ```ini | |
57 [connect] | |
58 type = "unix" | |
59 path = "/tmp/irccd.sock" | |
60 ``` | |
61 | |
62 # The alias section | |
63 | |
64 The alias section can be used to define custom user commands. | |
65 | |
66 To define an alias, just add a new section named `[alias.name]` where name is | |
67 your desired alias name. | |
68 | |
69 Then, add any option you like to execute commands you want. The option name is | |
70 ignored and serves as auto-documentation only. | |
71 | |
72 Example: | |
73 | |
74 ```ini | |
75 [alias.present] | |
76 say-hello = ( "server-message", "localhost", "#staff", "hello world!" ) | |
77 warning = ( "server-me", "localhost", "#staff", "is a bot") | |
78 ``` | |
79 | |
80 This example defines an alias `present` that will: | |
81 | |
82 1. Send a message on the channel #staff in the server localhost | |
83 2. Send an action emote on the same channel | |
84 | |
85 To use this alias, call `irccdctl present`. | |
86 | |
87 ## Placeholders | |
88 | |
89 Sometimes, you want to pass parameters to your alias. The placeholder syntax | |
90 allows you to define where your command line arguments will be replaced before | |
91 being sent to irccd. | |
92 | |
93 The syntax uses `%n` where **n** is an integer starting from 0. | |
94 | |
95 As you have seen in the `present` alias example above, the channel and server | |
96 are hardcoded so the user is not able to use this alias for different channels. | |
97 Let's update this alias with placeholders to make it more generic. | |
98 | |
99 Example: | |
100 | |
101 ```ini | |
102 [alias.present] | |
103 say-hello = ( "server-message", "%0", "%1", "hello world!" ) | |
104 warning = ( "server-me", "%0", "%1", "is a bot") | |
105 ``` | |
106 | |
107 Now, the `present` alias will except two arguments from the command line when | |
108 the user invokes `irccdctl present`. Thus if you want to use this alias on the | |
109 **#staff@localhost**, you call the alias using | |
110 `irccdctl present localhost #staff` |