-
Notifications
You must be signed in to change notification settings - Fork 6
/
dgamelaunch.conf
462 lines (386 loc) · 16 KB
/
dgamelaunch.conf
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
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
# Global config variables:
# Max amount of registered users to allow.
maxusers = 64000
allow_new_nicks = yes
# Max length for newly registered nicks. Must be less than 20.
# By default, NetHack only stores the first 10 chars of a name into
# the record/logfile.
maxnicklen = 20
# Set the default watching-screen sorting mode. Can be one of
# "username", "game", "windowsize", "starttime" or "idletime".
# "username" is the default.
sortmode = "username"
# Maximum idle time in menus
menu_max_idle_time = 3600
# Path to a prepared chroot jail.
chroot_path = "%%DGL_CHROOT%%/"
# From inside the jail, dgamelaunch's working directory for rcfiles/ttyrec/etc
dglroot = "%%CHROOT_DGLDIR%%/"
# Server ID string
server_id = "your server info goes here"
# From inside the jail, location of a banner file, the topmost line will be
# shown in submenus that cannot be defined separately.
# Some string substitution is done for the file:
# $VERSION replaced with "dgamelaunch v" + dgl version number.
# $SERVERID replaced with the server_id string, as defined above.
banner = "%%CHROOT_DGLDIR%%/data/dgl-banner"
# The following two options are fairly insecure. They will force us to
# load the password/group database into memory while still having root
# privileges. Replace them with shed_uid/shed_gid entries as soon as
# possible if you decide to use them. dgamelaunch will inform you of
# the uids/gids corresponding to your choices when it loads.
#
# Note that shed_uid and shed_gid will always take precedence over
# shed_user and shed_group if they are specified.
# shed_user: username to shed privileges to
# shed_user = crawl
# shed_group: group name to shed privileges to
# shed_group = crawl
# Preferably, you may use the respective gids/uids.
# crawl/crawl
shed_uid = %%DGL_UID%%
shed_gid = %%DGL_GID%%
# The defaults are usually just fine for this. passwd refers to the file
# that stores the user database, and lockfile is only used internally by
# dgamelaunch.
passwd = "%%CHROOT_DGLDIR%%/data/dgl-login"
lockfile = "%%CHROOT_DGLDIR%%/data/dgl-lock"
watch_columns = [ ["", "", 0, "%s)"],
["User", "username", 3, "%-15s"],
["Game", "game", 19, "%-9s"],
["Where", "extrainfo", 33, "%-18s"],
["Term", "windowsize", 53, "%s"],
["Idle", "idletime", 62, "%-10s"],
["Viewers", "watchers", 73, "%4s"]
]
#
# define some commands that are run when something happens. format is
# commands [ <time> ] = <command> ...
#
# <time> can be one of:
# dglstart = when someone telnets in
# login = when user has logged in
# register = right after a new user is registered
# gamestart = just before a game is started
#
# <command> is:
# mkdir "foo" = create a directory "foo"
# chdir "foo" = change current work dir to "foo"
# cp "foo" "bar" = copy file "foo" to "bar", overwriting previous "bar"
# ifnxcp "foo" "bar" = copy file "foo" to "bar", if "bar" doesn't exist
# unlink "foo" = delete file "foo"
# setenv "foo" "bar" = set environment variable "foo" to "bar"
# exec "foo" "bar" = execute "foo" with "bar" as it's param
# chpasswd = do the change password prompting, if logged in
# chmail = do the change email prompting, if logged in
# watch_menu = go to the watching menu
# quit = quit dgl
# ask_login = do the login prompting, if not logged in
# ask_register = do register new user prompting, if not logged in and
# registration of new nicks is allowed.
# edit_options "foo" = edit options for game which has the short name "foo"
# (user must be logged in)
# play_game "foo" = start game which has the short name "foo"
# (user must be logged in)
# submenu "foo" = go to submenu "foo"
# return = return from submenu
#
# The commands will be done inside the chroot and with the uid and gid
# defined above.
# Parameters to the commands are subject to variable substitution:
# %r = dglroot, as defined above
# %n = user nick, if user is logged in
# %u = shed_uid, as defined above, but numeric
# %g = game name, if user has selected a game.
# %s = short game name, if user has selected a game.
#
# eg. commands[login] = mkdir "foo", unlink "bar", setenv "Z" "foo"
#
commands[register] = mkdir "%%CHROOT_TTYRECDIR%%/%n",
ifnxcp "%rdata/crawl-git.macro" "%rrcfiles/crawl-git/%n.macro",
ifnxcp "%rdata/crawl-git-settings/init.txt" "%rrcfiles/crawl-git/%n.rc",
ifnxcp "%rdata/crawl-git.macro" "%rrcfiles/crawl-0.25/%n.macro",
ifnxcp "%rdata/crawl-0.25-settings/init.txt" "%rrcfiles/crawl-0.25/%n.rc"
commands[login] = mkdir "%%CHROOT_TTYRECDIR%%/%n",
ifnxcp "%rdata/crawl-git.macro" "%rrcfiles/crawl-git/%n.macro",
ifnxcp "%rdata/crawl-git-settings/init.txt" "%rrcfiles/crawl-git/%n.rc",
ifnxcp "%rdata/crawl-git.macro" "%rrcfiles/crawl-0.25/%n.macro",
ifnxcp "%rdata/crawl-0.25-settings/init.txt" "%rrcfiles/crawl-0.25/%n.rc"
menu["mainmenu_anon"] {
bannerfile = "%%CHROOT_DGLDIR%%/data/menus/main_anon.txt"
# cursor = (5,18)
commands["lL"] = ask_login
commands["rR"] = ask_register
commands["wW"] = watch_menu
commands["qQ"] = quit
}
menu["mainmenu_admin"] {
bannerfile = "%%CHROOT_DGLDIR%%/data/menus/main_admin.txt"
commands["cC"] = chpasswd
commands["eE"] = chmail
commands["wW"] = watch_menu
commands["tT"] = submenu "crawl-git"
commands["rR"] = submenu "crawl-0.25"
commands["pP"] = play_game "dcss-0.25"
commands["sS"] = play_game "spr-0.25"
commands["qQ"] = quit
}
menu["mainmenu_user"] {
bannerfile = "%%CHROOT_DGLDIR%%/data/menus/main_user.txt"
commands["cC"] = chpasswd
commands["eE"] = chmail
commands["wW"] = watch_menu
commands["tT"] = submenu "crawl-git"
commands["rR"] = submenu "crawl-0.25"
commands["pP"] = play_game "dcss-0.25"
commands["sS"] = play_game "spr-0.25"
commands["qQ"] = quit
}
menu["watchmenu_help"] {
bannerfile = "%%CHROOT_DGLDIR%%/data/menus/watchmenu_help.txt"
commands["qQ "] = return
}
menu["crawl-git"] {
bannerfile = "%%CHROOT_DGLDIR%%/data/menus/crawl_git.txt"
commands["o"] = exec "ee" "%rrcfiles/crawl-git/%n.rc"
commands["O"] = exec "virus" "%rrcfiles/crawl-git/%n.rc"
commands["m"] = exec "ee" "%rrcfiles/crawl-git/%n.macro"
commands["M"] = exec "virus" "%rrcfiles/crawl-git/%n.macro"
commands["v"] = exec "ee" "%%CHROOT_CRAWL_GAMEDIR%%/data/docs/crawl_changelog.txt"
commands["V"] = exec "virus" "%%CHROOT_CRAWL_GAMEDIR%%/data/docs/crawl_changelog.txt"
commands["pP"] = play_game "dcss-git"
commands["tT"] = play_game "tut-git"
commands["sS"] = play_game "spr-git"
commands["A"] = submenu "crawl-git-adv"
commands["wW"] = watch_menu
commands["qQ"] = return
}
menu["crawl-0.25"] {
bannerfile = "%%CHROOT_DGLDIR%%/data/menus/crawl-0.25.txt"
commands["o"] = exec "ee" "%rrcfiles/crawl-0.25/%n.rc"
commands["O"] = exec "virus" "%rrcfiles/crawl-0.25/%n.rc"
commands["m"] = exec "ee" "%rrcfiles/crawl-0.25/%n.macro"
commands["M"] = exec "virus" "%rrcfiles/crawl-0.25/%n.macro"
commands["v"] = exec "ee" "%%CHROOT_CRAWL_BASEDIR%%/crawl-0.25/data/docs/changelog.txt"
commands["V"] = exec "virus" "%%CHROOT_CRAWL_BASEDIR%%/crawl-0.25/data/docs/changelog.txt"
commands["pP"] = play_game "dcss-0.25"
commands["tT"] = play_game "tut-0.25"
commands["sS"] = play_game "spr-0.25"
commands["A"] = submenu "crawl-0.25-adv"
commands["wW"] = watch_menu
commands["qQ"] = return
}
menu["crawl-git-adv"] {
bannerfile = "%%CHROOT_DGLDIR%%/data/menus/crawl_git_adv.txt"
commands["B"] =
exec "/bin/savegame-backup.sh" "%n crawl-git %%CHROOT_CRAWL_BASEDIR%%",
return
commands["O"] =
cp "%rdata/crawl-git-settings/init.txt" "%rrcfiles/crawl-git/%n.rc",
return
commands["M"] =
cp "%rdata/crawl-git.macro" "%rrcfiles/crawl-git/%n.macro",
return
commands["qQ"] = return
}
menu["crawl-0.25-adv"] {
bannerfile = "%%CHROOT_DGLDIR%%/data/menus/crawl-0.25_adv.txt"
commands["B"] =
exec "/bin/savegame-backup.sh" "%n crawl-0.25 %%CHROOT_CRAWL_BASEDIR%%",
return
commands["O"] =
cp "%rdata/crawl-0.25-settings/init.txt" "%rrcfiles/crawl-0.25/%n.rc",
return
commands["M"] =
cp "%rdata/crawl-git.macro" "%rrcfiles/crawl-0.25/%n.macro",
return
commands["qQ"] = return
}
##############################################################################
## GIT
##############################################################################
DEFINE {
game_path = "/bin/crawl-git-launcher.sh"
game_name = "Crawl (trunk)"
short_name = "dcss-git"
game_args = "/bin/crawl-git-launcher.sh",
"-name", "%n",
"-rc", "%rrcfiles/crawl-git/%n.rc",
"-macro", "%rrcfiles/crawl-git/%n.macro",
"-webtiles-socket", "%%CHROOT_CRAWL_BASEDIR%%/webserver/sockets/%n:dcss-git.sock",
"-morgue", "%rmorgue/%n/"
extra_info_file = "%rmorgue/%n/%n.dglwhere"
#
# From inside the jail, where dgamelaunch should put mail - should
# match up with the game's settings.
spooldir = "%%CHROOT_MAILSPOOL%%/"
max_idle_time = 3600
# make sure the inprogress dir actually exists. default is "inprogress/"
# each game you define here must have it's own.
inprogressdir = "%rinprogress/crawl-git/"
ttyrecdir = "%%CHROOT_TTYRECDIR%%/%n/"
commands =
ifnxcp "%rdata/crawl-git.macro" "%rrcfiles/crawl-git/%n.macro",
ifnxcp "%rdata/crawl-git-settings/init.txt" "%rrcfiles/crawl-git/%n.rc",
setenv "MAIL" "%%CHROOT_MAILSPOOL%%/%n",
setenv "SIMPLEMAIL" "1",
unlink "%%CHROOT_MAILSPOOL%%/%n",
mkdir "%rmorgue/%n/"
encoding = "UTF-8"
}
##############################################################################
DEFINE {
game_path = "/bin/crawl-git-launcher.sh"
game_name = "Sprint (trunk)"
short_name = "spr-git"
game_args = "/bin/crawl-git-launcher.sh",
"-name", "%n",
"-rc", "%rrcfiles/crawl-git/%n.rc",
"-macro", "%rrcfiles/crawl-git/%n.macro",
"-webtiles-socket", "%%CHROOT_CRAWL_BASEDIR%%/webserver/sockets/%n:spr-git.sock",
"-morgue", "%rmorgue/%n/",
"-sprint"
extra_info_file = "%rmorgue/%n/%n.dglwhere"
#
# From inside the jail, where dgamelaunch should put mail - should
# match up with the game's settings.
spooldir = "%%CHROOT_MAILSPOOL%%/"
max_idle_time = 3600
# make sure the inprogress dir actually exists. default is "inprogress/"
# each game you define here must have it's own.
inprogressdir = "%rinprogress/crawl-git-sprint/"
ttyrecdir = "%%CHROOT_TTYRECDIR%%/%n/"
commands =
ifnxcp "%rdata/crawl-git.macro" "%rrcfiles/crawl-git/%n.macro",
ifnxcp "%rdata/crawl-git-settings/init.txt" "%rrcfiles/crawl-git/%n.rc",
setenv "MAIL" "%%CHROOT_MAILSPOOL%%/%n",
setenv "SIMPLEMAIL" "1",
unlink "%%CHROOT_MAILSPOOL%%/%n",
mkdir "%rmorgue/%n/"
encoding = "UTF-8"
}
##############################################################################
DEFINE {
game_path = "/bin/crawl-git-launcher.sh"
game_name = "Tutorial (trunk)"
short_name = "tut-git"
game_args = "/bin/crawl-git-launcher.sh",
"-name", "%n",
"-rc", "%rrcfiles/crawl-git/%n.rc",
"-macro", "%rrcfiles/crawl-git/%n.macro",
"-webtiles-socket", "%%CHROOT_CRAWL_BASEDIR%%/webserver/sockets/%n:tut-git.sock",
"-morgue", "%rmorgue/%n/",
"-tutorial"
extra_info_file = "%rmorgue/%n/%n.dglwhere"
#
# From inside the jail, where dgamelaunch should put mail - should
# match up with the game's settings.
spooldir = "%%CHROOT_MAILSPOOL%%/"
max_idle_time = 3600
# make sure the inprogress dir actually exists. default is "inprogress/"
# each game you define here must have it's own.
inprogressdir = "%rinprogress/crawl-git-tut/"
ttyrecdir = "%%CHROOT_TTYRECDIR%%/%n/"
commands =
ifnxcp "%rdata/crawl-git.macro" "%rrcfiles/crawl-git/%n.macro",
ifnxcp "%rdata/crawl-git-settings/init.txt" "%rrcfiles/crawl-git/%n.rc",
setenv "MAIL" "%%CHROOT_MAILSPOOL%%/%n",
setenv "SIMPLEMAIL" "1",
unlink "%%CHROOT_MAILSPOOL%%/%n",
mkdir "%rmorgue/%n/"
encoding = "UTF-8"
}
##############################################################################
## 0.25
##############################################################################
DEFINE {
game_path = "/bin/crawl-stable-launcher.sh"
game_name = "Crawl (0.25)"
short_name = "dcss-0.25"
game_args = "/bin/crawl-stable-launcher.sh", "0.25",
"-name", "%n",
"-rc", "%rrcfiles/crawl-0.25/%n.rc",
"-macro", "%rrcfiles/crawl-0.25/%n.macro",
"-webtiles-socket", "%%CHROOT_CRAWL_BASEDIR%%/webserver/sockets/%n:dcss-0.25.sock",
"-morgue", "%rmorgue/%n/"
extra_info_file = "%rmorgue/%n/%n.dglwhere"
#
# From inside the jail, where dgamelaunch should put mail - should
# match up with the game's settings.
spooldir = "%%CHROOT_MAILSPOOL%%/"
max_idle_time = 3600
# make sure the inprogress dir actually exists. default is "inprogress/"
# each game you define here must have it's own.
inprogressdir = "%rinprogress/crawl-25/"
ttyrecdir = "%%CHROOT_TTYRECDIR%%/%n/"
commands =
ifnxcp "%rdata/crawl-git.macro" "%rrcfiles/crawl-0.25/%n.macro",
ifnxcp "%rdata/crawl-0.25-settings/init.txt" "%rrcfiles/crawl-0.25/%n.rc",
setenv "MAIL" "%%CHROOT_MAILSPOOL%%/%n",
setenv "SIMPLEMAIL" "1",
unlink "%%CHROOT_MAILSPOOL%%/%n",
mkdir "%rmorgue/%n/"
encoding = "UTF-8"
}
##############################################################################
DEFINE {
game_path = "/bin/crawl-stable-launcher.sh"
game_name = "Sprint (0.25)"
short_name = "spr-0.25"
game_args = "/bin/crawl-stable-launcher.sh", "0.25",
"-name", "%n",
"-rc", "%rrcfiles/crawl-0.25/%n.rc",
"-macro", "%rrcfiles/crawl-0.25/%n.macro",
"-webtiles-socket", "%%CHROOT_CRAWL_BASEDIR%%/webserver/sockets/%n:spr-0.25.sock",
"-morgue", "%rmorgue/%n/",
"-sprint"
extra_info_file = "%rmorgue/%n/%n.dglwhere"
#
# From inside the jail, where dgamelaunch should put mail - should
# match up with the game's settings.
spooldir = "%%CHROOT_MAILSPOOL%%/"
max_idle_time = 3600
# make sure the inprogress dir actually exists. default is "inprogress/"
# each game you define here must have it's own.
inprogressdir = "%rinprogress/crawl-25-sprint/"
ttyrecdir = "%%CHROOT_TTYRECDIR%%/%n/"
commands =
ifnxcp "%rdata/crawl-git.macro" "%rrcfiles/crawl-0.25/%n.macro",
ifnxcp "%rdata/crawl-0.25-settings/init.txt" "%rrcfiles/crawl-0.25/%n.rc",
setenv "MAIL" "%%CHROOT_MAILSPOOL%%/%n",
setenv "SIMPLEMAIL" "1",
unlink "%%CHROOT_MAILSPOOL%%/%n",
mkdir "%rmorgue/%n/"
encoding = "UTF-8"
}
##############################################################################
DEFINE {
game_path = "/bin/crawl-stable-launcher.sh"
game_name = "Tutorial (0.25)"
short_name = "tut-0.25"
game_args = "/bin/crawl-stable-launcher.sh", "0.25",
"-name", "%n",
"-rc", "%rrcfiles/crawl-0.25/%n.rc",
"-macro", "%rrcfiles/crawl-0.25/%n.macro",
"-webtiles-socket", "%%CHROOT_CRAWL_BASEDIR%%/webserver/sockets/%n:tut-0.25.sock",
"-morgue", "%rmorgue/%n/",
"-tutorial"
extra_info_file = "%rmorgue/%n/%n.dglwhere"
#
# From inside the jail, where dgamelaunch should put mail - should
# match up with the game's settings.
spooldir = "%%CHROOT_MAILSPOOL%%/"
max_idle_time = 3600
# make sure the inprogress dir actually exists. default is "inprogress/"
# each game you define here must have it's own.
inprogressdir = "%rinprogress/crawl-25-tut/"
ttyrecdir = "%%CHROOT_TTYRECDIR%%/%n/"
commands =
ifnxcp "%rdata/crawl-git.macro" "%rrcfiles/crawl-0.25/%n.macro",
ifnxcp "%rdata/crawl-0.25-settings/init.txt" "%rrcfiles/crawl-0.25/%n.rc",
setenv "MAIL" "%%CHROOT_MAILSPOOL%%/%n",
setenv "SIMPLEMAIL" "1",
unlink "%%CHROOT_MAILSPOOL%%/%n",
mkdir "%rmorgue/%n/"
encoding = "UTF-8"
}