1KGB.CONF(5p) User Contributed Perl Documentation KGB.CONF(5p)
2
3
4
6 kgb.conf -- KGB bot configuration file
7
9 kgb.conf is the main configuration file of the KGB bot. Its location is
10 in /etc/kgb-bot/ unless changed with the --conf command line option.
11 See kgb-bot(1).
12
13 The file format is YAML. Elaborate example configuration is at the end
14 of this document.
15
17 soap
18 A map with the following possible keys:
19
20 server_addr
21 IP address to listen to. Defaults to 127.0.0.1.
22
23 For making KGB bot listen on all addresses, set the value to
24 0.0.0.0.
25
26 server_port
27 Port to listen to.
28
29 service_name
30 SOAP service name. Defaults to "KGB".
31
32 pid_dir
33 Directory to store PID file to. Defaults to /var/run/kgb-bot/.
34
35 include
36 Path to file with additional configuration. May be a path to a
37 directory, in which case all files in it ending with ".conf" are
38 loaded, in alphabetical order.
39
40 min_protocol_version
41 Minimum version of the protocol that will be supported by the server.
42 Defaults to 1. Protocol version 0 has no authentication.
43
44 queue_limit
45 When messages are sent to IRC, there is certain rate limitting, which
46 may prevent the message to be sent right away. In this case messages
47 are enqueued, and this parameter configures the size of the queue. When
48 the queue is full client requests are rejected.
49
50 repositories
51 A map with keys project names and values maps with project details:
52
53 password
54 Password used for authenticating all requests from this project.
55
56 private
57 If true, disables commit announces to 'broadcast' IRC channels.
58
59 networks
60 A map with keys network names and values map of network configuration,
61 containing the following items:
62
63 server
64 IP address/hostname of the IRC server to connect to.
65
66 port
67 Port number to connect to.
68
69 nick
70 Bot's nick on the network.
71
72 ircname
73 The full name of the bot on the network.
74
75 username
76 The username presented to the network.
77
78 password
79 A password for the network.
80
81 nickserv_password
82 A password for Nick server identification.
83
84 flood
85 If defined to a true value, the built-in rate-limitting feature of
86 the IRC component will be turned off. WARNING: this may cause the
87 bot to be kicked off the IRC network. Use only when you control
88 both the bot and the IRC network (e.g. when testing).
89
90 channels
91 A list of channels. Each element is a map and represents the channel's
92 configuration:
93
94 name
95 Channel name, e.g. "#commits". Mandatory.
96
97 network
98 Network name, as described in the networks map. Mandatory.
99
100 broadcast
101 Enables broadcasting all commit notifications to this channel.
102
103 repos
104 A list of project names, as described in the repositories map.
105 Mandatory unless broadcast is enabled.
106
107 smart_answers
108 Each channel can contain separate list of smart answers, see below.
109
110 smart_answers
111 A list of strings to be used as replies when the bot is addressed on
112 IRC.
113
114 smart_answers_polygen
115 If set to a true value, polygen(1) will be used to generate replies
116 when the bot is addressed on IRC.
117
118 debug
119 Enables logging of additional diagnostic information.
120
121 admins
122 A list of IRC masks, used to determine if a given IRC nick is bot
123 administrator. Note that currently these nicks have no additional
124 power.
125
126 colors
127 A map of colors to be used when painting commit messages. The following
128 keys are recognized:
129
130 revision
131 Commit ID. Default: none.
132
133 path
134 Changed path. Default: teal.
135
136 Depending on the action performed to the path, additional coloring
137 is made:
138
139 addition
140 Used for added paths. Default: green.
141
142 modification
143 Used for modified paths. Default: teal.
144
145 deletion
146 Used for deleted paths. Default: bold red.
147
148 replacement
149 Used for replaced paths (a Subversion concept). Default: brown.
150
151 prop_change
152 Used for paths with changed properties (a Subversion concept),
153 combined with other colors depending on the action -- addition,
154 modification or replacement. Default: underline.
155
156 author
157 Commit author. Default: green.
158
159 branch
160 Commit branch. Default: brown.
161
162 module
163 Project module. Default: purple.
164
165 web URL to commit information. Default: silver.
166
167 separator
168 The separator before the commit log. Default: none.
169
170 short_url_service name
171 The name of a WWW::Shorten module to use for URL-shortening. The
172 leading "WWW::Shorten::" part must be omitted.
173
174 Default: none
175
176 Example: Debli
177
179 # vim: filetype=yaml
180 ---
181 soap:
182 server_addr: 127.0.0.1
183 server_port: 9999
184 service_name: KGB
185 queue_limit: 150
186 log_file: "/var/log/kgb-bot.log"
187 include: "/etc/kgb-bot/kgb.conf.d"
188 repositories:
189 # just a name to identify it
190 foo:
191 # needs to be the same on the client
192 password: supersecret
193 # private repositories aren't announced to broadcast channels
194 # private: yes
195 # Some witty answer for people that talk to the bot
196 #smart_answers:
197 # - "I won't speak with you!"
198 # - "Do not disturb!"
199 # - "Leave me alone, I am buzy!"
200 # Admins are allowed some special !commands (currently only !version)
201 #admins:
202 # - some!irc@mask
203 # - some!other@host
204 networks:
205 freenode:
206 nick: KGB
207 ircname: KGB bot
208 username: kgb
209 password: ~
210 nickserv_password: ~
211 server: irc.freenode.net
212 port: 6667
213 channels:
214 # a broadcast channel
215 - name: '#commits'
216 network: freenode
217 broadcast: yes
218 # a channel, tied to one or several repositories
219 - name: '#foo'
220 network: freenode
221 repos:
222 - foo
223 # Can also be set per-channel
224 #smart_answers:
225 # - "I'm in ur channel, watching ur commits!"
226 # - "I am not listening"
227 # - "Shut up! I am buzy watching you."
228 pid_dir: /var/run/kgb-bot
229 # anything less is rejected
230 min_protocol_ver: 1
231 # default colors:
232 colors:
233 repository: bold
234 revision: bold
235 author: green
236 branch: brown
237 module: purple
238 path: teal
239 addition: green
240 modification: teal
241 deletion: "bold red"
242 replacement: reverse
243 prop_change: underline
244 web: silver
245 # you can combine them like "bold red" (ouch!)
246 # available colors: black, navy, green, red, brown, purple, orange, yellow,
247 # lime, teal, aqua, blue, fuchsia, gray, silver, white
248 # available modifiers: bold underline reverse
249 short_url_service: Debli
250
252 kgb-bot(1), kgb-client(1)
253
255 Damyan Ivanov dmn@debian.org
256
258 Copyright (C) 2012, 2013 Damyan Ivanov
259
260 This program is free software; you can redistribute it and/or modify it
261 under the terms of the GNU General Public License as published by the
262 Free Software Foundation; either version 2 of the License, or (at your
263 option) any later version.
264
265 This program is distributed in the hope that it will be useful, but
266 WITHOUT ANY WARRANTY; without even the implied warranty of
267 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
268 General Public License for more details.
269
270 You should have received a copy of the GNU General Public License along
271 with this program; if not, write to the Free Software Foundation, Inc.,
272 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
273
274
275
276perl v5.34.0 2022-01-20 KGB.CONF(5p)