blob: 71605dcdabae670846e3ca169ea3ad433864d2f1 (
plain)
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
|
#
# Server Specific Config
#
# This template is used to generate the server specific bits of the config.
#
#
# Server Description
#
<server name="<%= hostname %>"
description="The InsomniaIRC Network"
network="InsomniaIRC">
#
# Admin Information
#
<admin name="<%= server.admin['name'] %>"
nick="<%= server.admin['nick'] %>"
email="<%= server.admin['email'] %>">
#
# Binds
#
<bind address="*" port="6667" type="clients">
<bind address="*" port="6697" type="clients" ssl="gnutls">
<bind address="*" port="6663" type="servers">
<bind address="*" port="6664" type="servers" ssl="gnutls">
<gnutls cafile="ca.pem"
certcount="4"
certfile="conf/irc.crt"
crlfile="crl.pem"
dh_bits="1024"
keyfile="conf/irc.key">
<dns server="8.8.8.8" timeout="5">
#
# Connection Settings
#
<connect allow="*"
flood="20"
globalmax="10"
localmax="10"
modes="+ixw"
pingfreq="120"
recvq="8192"
sendq="262144"
threshold="1"
timeout="60">
#
# Link Configuration
#
<% server.links.each do |link| %>
<link name="<%= link['hostname'] %>"
ipaddr="<%= link['ipddr'].nil? ? Resolv.getaddress(link['hostname']) : link['ip'] %>"
port="<%= link['port'].nil? ? 6664 : link['port'] %>"
ssl="gnutls"
bind="<%= link['bind'].nil? ? Resolv.getaddress(hostname) : link['bind'] %>"
statshidden="no"
hidden="no"
sendpass="<%= secret link['hostname'] %>"
recvpass="<%= secret hostname %>">
<% end %>
<% if !hostname.nil? && File.file?("servers/#{hostname}") %>
<%= ERB.new(File.read("config-src/servers/#{hostname}")).result(binding) %>
<% end %>
|