-
Notifications
You must be signed in to change notification settings - Fork 7
/
config.sample.js
377 lines (376 loc) · 11.1 KB
/
config.sample.js
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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
module.exports = {
// Project Config
project: require('./package.json'),
// Bot specific
bot: {
// trigger: '`', // Uncomment and set to specify custom trigger, defaults to bots nick
// triggerSpace: false, // Require a space after the trigger
debug: true,
debugLevel: 'info',
webDebug: true,
webDebugLevel: 'info',
disableScripts: false,
// Effects SSL on Requests
strictTLS: false,
// Script Directories
scripts: [
// Core Libs
'/scripts/lib',
// Data Generators (Promises)
'/scripts/generators',
// Express end points
'/scripts/pages',
// Single Point commands
'/scripts/commands',
// Administrative commands
'/scripts/admin',
// Owner commands
'/scripts/owner',
// Listeners
'/scripts/listeners',
// Scripts that have mix of everything
'/scripts/modules',
// Fsociety Module -- For #fsociety on Freenode
// '/scripts/fsociety',
// URL Listener feature
'/scripts/urlListener',
// Covid19
'/scripts/covid19',
// Only load in development
// '/scripts/beta',
],
// Model Directories
models: [
'models',
],
// Currently running Environment
env: 'devel',
},
// Localization setting
localization: {
debug: false,
lng: 'en',
defaultNS: 'app',
fallbackLng: 'en',
initImmediate: false,
whitelist: ['en'],
saveMissing: true,
saveMissingTo: 'current',
ns: ['app', 'libraries'],
preload: ['en'],
load: 'current',
},
// User Manager configuration
userManager: {
salt: 'samplesalt',
keyLength: 64,
},
// Socket IO Configuration
socketIO: {
logging: true,
},
// Command aliasinging
commandBindings: [{
command: 'update',
alias: 'upgrayeddd',
}, {
command: 'reload',
alias: 'refresh',
}, {
command: 'token',
alias: 'upload-token',
}],
// Owner configuration
owner: {
nick: 'IronY',
host: '',
},
// Irc Client Configuration see https://node-irc.readthedocs.io/en/latest/API.html#client
irc: {
nick: 'MrNodeBot',
server: 'irc.freenode.net',
// server: 'irc.dal.net',
userName: 'MrNodeBot',
realName: 'MrNodeBot',
port: 6665,
localAddress: null,
debug: false,
showErrors: true,
autoRejoin: true,
channels: [
'#MrNodeBot',
],
secure: false,
selfSigned: false,
certExpired: false,
floodProtection: true,
floodProtectionDelay: 500,
sasl: false,
retryCount: 100,
retryDelay: 2000,
stripColors: false,
channelPrefixes: '&#',
messageSplit: 512,
encoding: 'utf8',
},
// Knex configuration http://knexjs.org/#Installation-client
knex: {
enabled: true,
engine: 'mysql',
mysql: {
client: 'mysql2',
connection: {
host: '127.0.0.1',
user: 'MrNodeBot',
password: 'MrNodeBot',
database: 'MrNodeBot',
charset: 'utf8mb4',
},
},
sqlite: {
client: 'sqlite3',
database: 'mrnodebot',
connection: {
filename: './data.sqlite',
},
},
},
// Nickserv configuration options
nickserv: {
password: '',
nick: 'NickServ',
host: '', // services.dal.net for Dalnet, empty for Freenode
accCode: '3',
},
// API Keys
apiKeys: {
firebase: {
apiKey: '',
pageLinkDomain: '',
},
bitly: '',
omdb: '',
imgur: {
clientId: '',
clientSecret: '',
},
google: '',
twitter: {
enabled: false,
},
},
// Git Log configuration
gitLog: {
repo: __dirname,
number: 5,
fields: [
'subject',
'authorName',
'authorDateRel',
'abbrevHash',
],
},
// Command access levels
accessLevels: {
guest: 0,
identified: 1,
admin: 2,
owner: 3,
channelOp: 4,
channelVoice: 5,
channelOpIdentified: 6,
channelVoiceIdentified: 7,
},
// Express Configuration
express: {
port: 8084, // Bind Port
address: 'http://127.0.0.1:8084', // Bind address
// https://stackoverflow.com/questions/15771805/how-to-set-socket-io-origins-to-restrict-connections-to-one-url/21711242#21711242
allowedOrigins: 'https://www.fsociety.online:*',
forwarded: false, // Indiciate the site is behind a Http proxy
noFollow: true, // Prevent the express routes from being indexed by spiders
// Rate limiter for routes in the /api/ uir space
rateLimit: {
enabled: true,
limitInMins: 15, // The amount of mins for the rate limiter
max: 100, // The Max amount of requests
delayMs: 0, // The delay in ms (0 to indicate no delay until max)
headers: true, // Inject HTTP headers to show usage remaining
},
// Enable Simple Authentication
simpleAuth: {
enabled: false,
realm: '',
username: '',
password: '',
},
jwt: {
secret: 'mrnodebot',
},
},
// Feature Configuration
features: {
messenger: {
enabled: false,
pageId: '',
accessToken: '',
appId: '',
appSecret: '',
verifyToken: '',
},
webLogs: [
// '#mrnodebot'
],
seen: {
recursionLimit: 5,
allowRecursion: true,
},
watchYoutube: {
enabled: true,
},
voiceRegulars: {
// Auto voice anyone who comes into the channel, or at a specified time interval
autoVoice: true,
autoVoiceTimeInMins: 40,
autoVoiceChannelIgnore: [],
// Message threshold: used in both auto voice and manual voiceRegulars
threshold: 250,
},
sed: {
totalDbResults: 50,
triggerStart: 's',
delimiter: '/',
ignoredChannels: [],
},
popularity: {
delayInMins: 30,
cleanJobInMins: 30,
ignoredChannels: [],
},
urls: {
// Given User Agent
userAgent: 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36',
// Maximum Content Length
maxLength: 10485760,
// IRC channels to ignore logging from
loggingIgnore: [],
// IRC channels to ignore announcements from
announceIgnore: [],
// IRC channels to ignore unverified announces from
unverifiedIgnore: [],
// Default title announce max characters,
defaultTitleAnnounceMax: 255,
// Scheduler object for cache clean up
cacheCleanup: {
minute: 0,
},
// Amount of URLS per line, 0 or nothing for no limit
chainingLimit: {
'#mrnodebot3': 2,
},
// Amount of times to announce to channel, 0 or nothing for no limit
repostLimit: {
'#mrnodebot3': 2,
},
// Head whitelist, anything here will not require a pre-flight head request for URL matching
// use host format, eg: 'news.ycombinator.com'
headWhitelist: [
],
// Amount of characters to limit title to, 0 or nothing for no limit
titleMaxLimit: {
'#mrnodebot3': 255,
},
// Channel Diversions
diversions: [
// {
// source: '#coronavirus',
// dest: '#coronavirus-links'
// }
],
twitter: [
// {
// channel: '#mrnodebot2',
// hashtags: ['#test'],
// }
],
},
fsociety: {
mainChannel: '#MrNodeBot',
totalChannels: 0,
report: false,
delay: 5, // In seconds,
additionalChannels: [
// '#th3g3ntl3man',
],
greetIgnore: ['#MrNodeBot'],
greeterDealy: 20,
},
idleChat: {
enabled: false,
timeOutInMins: 180,
channels: ['#MrNodeBot'],
},
twitter: {
enabled: false,
},
conversational: {
randomChance: 5000,
enabled: false,
ignoredChans: [],
},
exchangeRate: {
apiKey: '', // obtain a free API key from fixer.io
coinMarketCapApiKey: '',
updateScheduleTime: {
hour: [...Array(24).keys()], // Every hour
minute: 0, // On the hour
},
},
weather: {},
countdowns: [
{
who: 'Mr Robot Season 3',
when: new Date(2017, 9, 11, 22, 0, 0, 0), // MomentJS
what: [
'is happening in',
'is coming to a screen near you in',
'is hacking all the things in',
'will be brought to you in',
'drops in',
'is hacking your democracy in',
],
where: 'USA Network',
why: {
irc: {
'#mrrobot': {
announcements: [
{
year: null,
month: null,
date: null,
dayOfWeek: null,
hour: 0,
minute: 0,
second: 0,
},
],
},
'#fsociety': {
announcements: [
{
year: null,
month: null,
date: null,
dayOfWeek: null,
hour: 0,
minute: 0,
second: 0,
},
],
},
},
},
},
],
},
};