-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.default.coffee
235 lines (171 loc) · 9.2 KB
/
config.default.coffee
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
##
## CONFIG ##
##
module.exports = {
# Database access config (MySQL)
#
# IP of the SQL server (mostly localhost)
SQL_HOST: '127.0.0.1'
# Port of the SQL server. Default is the MySQL port
SQL_PORT: 3306
# Username for connecting to SQL server
SQL_USER: 'USERNAME'
# Password for connecting to SQL server
SQL_PASSWORD: 'SECRET'
# The name of the database in which the app stores its own tables.
# It's also the default database to connect to.
SQL_DATABASE_COMMON: 'irc_gateway'
# Example: The name of the database which contains the tables for game-specific data
SQL_DATABASE_GAME: 'game_core'
# The socket path of the SQL server. Default is the MySQL socket path.
# (For MySQL, find out the path using 'mysqladmin variables | grep sock'.)
# Define this path on Unix systems. Set the path to null on Windows systems.
SQL_SOCKET_PATH: '/var/run/mysqld/mysqld.sock'
# Tables used by the app (Only used by the database file, so you can set up your own entries too)
SQL_TABLES: {
# The name of the table for storing non-game/custom channels
# (Must be created once, see database_setup.sql)
CHANNEL_LIST: 'chat - channels'
# The name of the table for storing user joins to custom channels
# (Must be created once, see database_setup.sql)
CHANNEL_JOININGS: 'chat - channeljoins'
# The name of the table for storing chat histories of all channels
# (Must be created once, see database_setup.sql)
CHANNEL_LOGS: 'chat - channellogs'
# Example: The name of the table in common db, which contains the list of game worlds
GAMES_LIST: 'game_worlds'
# Example: The name of the table in common db, which maps a player to a game world (and an identity)
PLAYER_GAMES: 'player_games'
# Example: The name of the table in game db, which contains the player identities of a related game
GAME_PLAYER_IDENTITIES: 'game_player_identities'
}
# IRC access config
#
# IP of the IRC server to connect the gateway to
IRC_SERVER_IP: 'underworld1.no.quakenet.org'
# Port of the IRC server to connect the gateway to
IRC_SERVER_PORT: 6667
# The name of an IRC channel the global ingame channel should be mirrored to.
# Ingame players of all games will have access to it.
# Also see INTERN_GLOBAL_CHANNEL_TITLE.
IRC_GLOBAL_CHANNEL: '#irc_gateway_test'
# Prefix for an IRC channel name, which is used to mirror a custom channel to.
# See INTERN_NONGAME_CHANNEL_PREFIX for more info.
# Choose wisely to avoid conflicts with other channels on IRC.
IRC_NONGAME_CHANNEL_PREFIX: '#igw_ingame_'
# Webserver setup
#
# The port of the webserver started by this app
WEB_SERVER_PORT: 8050
# The directory to use for fetching static files (index.html, css file, etc.) from.
# Set null to disable the feature.
# Use <package_dir> as placeholder for the package root directory.
# Use <working_dir> as placeholder for the process working directory (default).
# The files will be available by URL "https://<Server-IP>/<filename>".
WEB_SERVER_STATICS_DELIVERY_DIR: '<working_dir>'
# The directory to use for fetching the chat's webclient files from
# (Can be equal to WEB_SERVER_STATICS_DELIVERY_DIR.).
# Set null to disable the feature.
# Use <package_dir> as placeholder for the package root directory.
# Use <working_dir> as placeholder for the process working directory.
# The webserver delivers following files located in the directory:
# "/webclient.js", "/webclient/<any file>"
# They will likewise be available under URL "https://<Server-IP>/chat/".
WEB_SERVER_CLIENT_DELIVERY_DIR: '<package_dir>/dist'
# The ssl certificate to use for the https webserver.
# Use <package_dir> as placeholder for the package root directory.
# Use <working_dir> as placeholder for the process working directory.
SSL_CERT_PATH: '<working_dir>/certs/server.crt'
# The uncrypted private key file of the ssl certificate.
# Use <package_dir> as placeholder for the package root directory.
# Use <working_dir> as placeholder for the process working directory.
SSL_KEY_PATH: '<working_dir>/certs/server.key'
# Common settings
#
# Debug mode: Set to true, to enable any debug output
DEBUG_ENABLED: true
# Debug sub setting: Set to true, to enable debug output from irc communication by bots
DEBUG_IRC_COMM: false
# Channel security: Set to true, to force clients to set a password when creating a channel
# (The password then must be at least 3 digits long)
REQUIRE_CHANNEL_PW: false
# Auth mode: Set to true, to enable client authentification by a security token
# (Otherwise all valid player IDs will be accepted)
AUTH_ENABLED: false
# A secret string to be used as part of the security token, if AUTH_ENABLED is set
# (The token needs to be sent from a client on login)
CLIENT_AUTH_SECRET: 'SECRET_2'
# General chat server settings
#
# Maximum number of simultaneously existing bots.
# Use this, to obey connection limits to IRC server (Will also limit number of chats for game worlds).
# Set it to 0 or less, to enable the mono-bot.
# The mono-bot represents all game worlds at once and thus relays chats in a more general way.
MAX_BOTS: 0
# Maximum number of logs per channel in database.
# This controls the max size of the chat logs table
MAX_CHANNEL_LOGS: 100
# Maximum number of channel logs for a client.
# This controls the max length of a channel's chat history a client can request
MAX_CHANNEL_LOGS_TO_CLIENT: 50
# Maximum number of custom channels a client/user is allowed to create
MAX_CHANNELS_PER_CLIENT: 3
# Interval time in seconds, for looking up the games list in database and
# create/destroy appropriate bots accordingly.
# Set it to 0 or less to switch off the lookup - games list is only updated on app start then.
GAMES_LOOKUP_INTERVAL: 5 * 60
# Timeout in milliseconds, for waiting for reconnect of a client before broadcasting its disconnection
# (If it reconnects before timeout, nothing is broadcasted)
CLIENTS_DISCONNECT_DELAY: 2000
# Internal chat server settings
#
# Display name of the global ingame channel (Also see INTERN_GLOBAL_CHANNEL_NAME).
# <Use the setting in your database implementation>
INTERN_GLOBAL_CHANNEL_TITLE: 'Community IRC'
# Internal unique name for the global ingame channel.
# This channel is mirrored to the IRC channel set by IRC_GLOBAL_CHANNEL.
# <Use the setting in your database implementation>
INTERN_GLOBAL_CHANNEL_NAME: 'community_channel'
# Prefix for the internal name of ingame channels, which each represent one game (appended by the game ID).
# These channels are so-called "game channels". They are created automatically.
# They are pure ingame channels - which means, they are not mirrored to IRC.
# <Use the setting in your database implementation>
INTERN_GAME_CHANNEL_PREFIX: 'game_'
# Prefix for the internal name of ingame channels, which can be created by players.
# These channels are so-called "custom channels".
# They are ingame channels in the first place, but can optionally be mirrored to IRC -
# in that case the IRC_NONGAME_CHANNEL_PREFIX is used for the IRC channel name.
# The prefix set here MUST differ from INTERN_GAME_CHANNEL_PREFIX.
# <Use the setting in your database implementation>
INTERN_NONGAME_CHANNEL_PREFIX: 'channel_'
# Flooding protection
#
# Interval in milliseconds, to be used for flooding protection:
# To recognize flooding, only client requests not older than this value are totaled up
FLOODRATE_TIME_INTERVAL: 3 * 1000
# Maximum total "weight" of client requests in time interval - A client is kicked, if he exceeds the limit
FLOODRATE_LIMIT_WEIGHT: 33
# Bot settings
#
# Delay time in milliseconds, for reconnecting to server, when connection has been refused
BOT_RECONNECT_DELAY: 61 * 1000
# The "official" name of the bot as displayed in its version info, may also use this in further name patterns
BOT_NAME: 'GameCommBot'
# The nick name of the Bot on IRC.
# If not using the mono-bot: Use <id> as a placeholder for the game ID
BOT_NICK_PATTERN: 'Game<id>'
# The user name of the Bot on IRC.
# If not using the mono-bot: Use <id> as a placeholder for the game ID
BOT_USERNAME_PATTERN: 'GameCommBot_<id>'
# The real name of the Bot on IRC.
# If not using the mono-bot: Use <id> and <name> as a placeholders for the game ID and game name
BOT_REALNAME_PATTERN: '<name> - GameCommBot <id>'
# A lower-case label used by the bot to commonly name its game world
# (For example 'game-instance', 'map', 'galaxy', etc.).
# Used for some bot commands.
BOT_GAME_LABEL: 'game-world'
# Bot message on channel part in IRC (which should only occur on its termination)
BOT_LEAVE_MESSAGE: 'Oh, cruel world... My time has come to leave, goodbye!'
# Bot message on server quit in IRC (which should only occur on its termination)
BOT_QUIT_MESSAGE: 'Oh, cruel world... My time has come to leave, goodbye!'
}