1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
|
#!/bin/bash
# -*- coding: utf-8 -*-
###########################################################################
# #
# envbot - an IRC bot in bash #
# Copyright (C) 2007-2008 Arvid Norlander #
# Copyright (C) 2011 Joseph Graham #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
###########################################################################
# Variables marked with (*) will take effect at a rehash as well.
# What version this config is at. This is used to check
# if your config needs updating.
config_version=17
####################
# General settings #
####################
# Nick to use
config_firstnick="pbot"
# Nick if first is in use
config_secondnick="pbot_"
# Nick if second is in use
config_thirdnick="pbot-ng"
config_ident='rfc3092'
config_gecos='ietf.org/rfc/rfc3092'
###################
# Server settings #
###################
# Server to use
config_server='irc.freenode.net'
# What port to use. Normally 6667 works for non SSL connections.
config_server_port='6667'
# If 1 use SSL, not all transport modules support this.
config_server_ssl=0
# Accept invalid server certificates?
# Note that some SSL modules (openssl for example) just
# print any errors and continues anyway
config_server_ssl_accept_invalid=1
# Be verbose when connecting?
# Not all SSL modules support it. The ones that doesn't
# support it will just ignore it.
# Be aware that this is mainly for debugging of SSL transport
# modules as it is possible the verbose output may confuse the bot!
config_server_ssl_verbose=0
# If not empty try to bind to this IP when connecting, useful
# to select vhost. Not all transport modules support this.
config_server_bind=""
# If this is empty don't use a server password.
config_server_passwd="$( cat password.secret )"
##################
# Access control #
##################
# (*) Access regexes
# Without at least one set, the bot won't start
# "owner" is a special capab that grants all other access.
# The first access entry must be an owner.
#
# Scope is a regular expression of channels where access is effective.
# A /msg (like say to a non channel) will get the scope MSG
# Anything affecting global state will have the scope "GLOBAL"
#
# There can be several access masks matching same host (to allow
# for different scope/capab combinations).
config_access_mask[1]='^xylon!user@2001:ba8:1f1:f216::5$'
config_access_capab[1]='owner'
config_access_scope[1]='.*'
# Some more access examples:
#config_access_mask[2]='^Someone!whatever@customer-1234\.isp\.com$'
#config_access_capab[2]='say kick'
#config_access_scope[2]='#channel'
#config_access_mask[3]='^Someone!whatever@customer-1234\.isp\.com$'
#config_access_capab[3]='facoid_admin'
#config_access_scope[3]='GLOBAL'
############
# Commands #
############
# (*) A regular expression of prefixes we should listen to.
config_commands_listenregex="(;|${config_firstnick}[:,] )"
# (*) Should we treat any message in /msg as a command even
# if it doesn't have the the listen prefix?
config_commands_private_always=1
############
# Feedback #
############
# (*) How to treat unknown commands:
# Valid values:
# 0 = Ignore them (drop command, do nothing).
# 1 = Return error to sender.
# 2 = Pass them on to modules that may handle "generic" PRIVMSG.
# Note that non-commands always get passed on to "generic" PRIVMSG handling modules.
config_feedback_unknown_commands=1
###########
# Logging #
###########
# Directory for log files
config_log_dir="logs"
# (*) Should we log raw data or not?
# Can be 1 (log) or 0 (don't log)
config_log_raw=1
# (*) Should we always log to STDOUT as well?
# Note that this doesn't mean it will not log at all if set to 0.
# It will still log errors and other important log messages to STDOUT.
# This is the same as --verbose.
# Can be 1 (log) or 0 (don't log)
config_log_stdout=0
# (*) When logging to STDOUT should we use colors?
config_log_colors=1
#############
# Transport #
#############
# Transport module. You should select exactly one.
# The recommended non-SSL module is dev-tcp.
# The recommended SSL module is gnutls.
config_transport='dev-tcp'
#config_transport='netcat' # Not well tested, for Debian users and other
# with broken distros.
#config_transport='gnutls'
#config_transport='socat' # Not well tested
#config_transport='openssl' # Not well tested
# netcat options
# MAKE SURE THEY ARE CORRECT if you use netcat.
#config_transport_netcat_path='/usr/bin/netcat'
# socat options
# MAKE SURE THEY ARE CORRECT if you use socat.
#
# This tells if to use IPv6 or IPv4 to connect.
# socat doesn't support automatic choice of this.
# Note that socat versions below 1.5 does not
# support using IPv6 and SSL at the same time.
# This can be either "ipv4" or "ipv6".
config_transport_socat_protocol_family=ipv4
# Where are transports stored, this can be a relative path from the
# main script of the bot, or an absolute path.
config_transport_dir="transport"
###########
# Modules #
###########
# What modules to load on startup, space separated list
# For a list of modules see the modules dir.
# Note that the order of the modules may be important
#
# The list should normally start with "modules rehash services umodes autojoin"
# Some modules should be placed last. "factoids" and "karma are such modules.
config_modules="modules rehash services umodes autojoin ctcp"
# Where are modules stored, this can be a relative path from the
# main script of the bot, or an absolute path.
config_modules_dir="modules"
############################
# Module specific settings #
############################
#####################################################################
# Services module
#
# (*) NickServ password
config_module_services_nickserv_passwd="${config_server_passwd}"
# (*) Name of NickServ
# Normally this is correct.
config_module_services_nickserv_name='NickServ'
# (*) Service style. Supported are: generic, atheme
# For the default server (irc.kuonet-ng.org) use atheme
# Otherwise try generic, that will work with atheme too but
# some features will be disabled.
config_module_services_style='atheme'
# (*) Use server side aliases
# Try 1 first, if the bot fails to identify try 0
config_module_services_server_alias=1
#####################################################################
# FAQ module
#
# (*) Location of FAQ items.
config_module_faq_file='data/faq.txt'
####################################################################
# Quote module
#
# (*) Location of quotes file
config_module_quotes_file='data/quotes.txt'
#####################################################################
# AutoJoin module.
#
# Channels to autojoin on connect
config_module_autojoin_channels[1]='#parabola'
# A channel can have a key as showed in the example below
config_module_autojoin_channels[2]='#botwars'
#####################################################################
# Umodes module.
#
# (*) Default umodes to set on connect. Also set these at a rehash.
config_module_umodes_default_umodes="+isB-w"
#####################################################################
# CTCP module
#
# (*) What to reply to VERSION requests.
config_module_ctcp_version_reply="pbot-ng $envbot_version"
#####################################################################
# SQLite3 module
#
# (*) Location of SQLite3 database file
#config_module_sqlite3_database='data/envbot.db'
#####################################################################
# Factoids module
#
# (*) Table name for factoids in SQLite3 database
#config_module_factoids_table='factoids'
#####################################################################
# Karma module
#
# (*) Table name for karma data in SQLite3 database
#config_module_karma_table='karma'
#####################################################################
# Seen module
#
# (*) Table name for seen data in SQLite3 database
#config_module_seen_table='seen'
#####################################################################
# Vote module.
#
# (*) The channel where vote mode will work.
# Note that this is a regular expression that will be
# surronded by ^ and $ when matching.
#config_module_vote_channel='#mychannel'
# (*) How long a vote is open before it is closed (in seconds).
#config_module_vote_timeout='900'
#####################################################################
# For contrib modules please see the contrib module in question
# for information on what variables it uses.
|