forked from matrix-org/matrix-appservice-irc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
49 lines (47 loc) · 1.41 KB
/
app.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
"use strict";
var Cli = require("matrix-appservice-bridge").Cli;
var log = require("./lib/logging").get("CLI");
var main = require("./lib/main");
var path = require("path");
const REG_PATH = "appservice-registration-irc.yaml";
new Cli({
registrationPath: REG_PATH,
enableRegistration: true,
enableLocalpart: true,
bridgeConfig: {
affectsRegistration: true,
schema: path.join(__dirname, "lib/config/schema.yml"),
defaults: {
homeserver: {
dropMatrixMessagesAfterSecs: 0,
},
ircService: {
ident: {
enabled: false,
port: 113
},
logging: {
level: "debug",
toConsole: true
},
statsd: {},
debugApi: {},
provisioning: {
enabled: false,
requestTimeoutSeconds: 60 * 5
}
}
}
},
generateRegistration: function(reg, callback) {
main.generateRegistration(reg, this.getConfig()).done(function(completeRegistration) {
callback(completeRegistration);
});
},
run: function(port, config, reg) {
main.runBridge(port, config, reg).catch(function(err) {
log.error("Failed to run bridge.");
throw err;
});
}
}).run();