comparison dgl/dgamelaunch.conf @ 24:ce26225f7d9d

Switch to the Git version of dgamelaunch.
author John "Elwin" Edwards
date Sun, 20 Oct 2013 17:45:38 -0700
parents f501c8dd6884
children dd72d2dd923f
comparison
equal deleted inserted replaced
23:070a9ced4d3e 24:ce26225f7d9d
1 # rlgallery.org configuration file for dgamelaunch 1 # This is a sample dgamelaunch configuration file. Only bash-style comments
2 # are allowed, such as this. Each configuration option will be explained
3 # along with its default value.
4
2 5
3 6
4 # Global config variables: 7 # Global config variables:
5 8
6 9
7 # Max amount of registered users to allow. Has no effect if dgl was 10 # Max amount of registered users to allow. Has no effect if dgl was
8 # compiled with SQLite 11 # compiled with SQLite
9 maxusers = 4096 12 maxusers = 64000
10 13
11 # Allow registration of new nicks? (yes or no) 14 # Allow registration of new nicks? (yes or no)
12 allow_new_nicks = yes 15 allow_new_nicks = yes
13 16
14 # Max length for newly registered nicks. Must be less than 20. 17 # Max length for newly registered nicks. Must be less than 20.
15 # By default, NetHack only stores the first 10 chars of a name into 18 # By default, NetHack only stores the first 10 chars of a name into
16 # the record/logfile. 19 # the record/logfile.
17 maxnicklen = 10 20 maxnicklen = 10
18 21
19 # Set the default watching-screen sorting mode. Can be one of 22 # Set the default watching-screen sorting mode. Can be one of
20 # "unsorted", "username" or "idletime". Unsorted is the default. 23 # "username", "game", "windowsize", "starttime" or "idletime".
24 # "username" is the default.
21 sortmode = "username" 25 sortmode = "username"
22 26
27 # Set the columns displayed in the watching-screen. Each column definition
28 # must have four elements as:
29 # [ "<display title>", "<sortname>", <Screen column>, "<printf format>" ]
30 #
31 # <sortname> may be "unsorted", "username", "game", "windowsize", "starttime",
32 # "duration", "idletime", or (if shmem is enabled) "watchers".
33 #
34 watch_columns = [ ["", "", 1, "%s)"],
35 ["User", "username", 4, "%-15s"],
36 ["Game", "game", 21, "%-11s"],
37 ["Term", "windowsize", 34, "%s"],
38 ["Idle", "idletime", 43, "%-10s"],
39 ["Started", "starttime", 60, "%s"]
40 ]
41
23 # Path to a prepared chroot jail. 42 # Path to a prepared chroot jail.
24 chroot_path = "/var/dgl/" 43 chroot_path = "/var/dgl"
25 44
26 # From inside the jail, dgamelaunch's working directory for rcfiles/ttyrec/etc 45 # From inside the jail, dgamelaunch's working directory for rcfiles/ttyrec/etc
27 dglroot = "/dgldir/" 46 dglroot = "/dgldir/"
28 47
29 # Server ID string 48 # Strings to be replaced in every banner
30 server_id = "Roguelike Gallery - rlgallery.org" 49 # you can have either direct string replacements, like
31 50 # "$FOO" = "BAR", or you can get the server time with
32 # From inside the jail, location of a banner file, the topmost line will be 51 # "$FOO" = timeformat("%F %T")
52 # for the timeformat parameter string format, see man strftime
53 bannervars = [ "$MOTDTIME" = "2011.10.08",
54 "$SERVERID" = "$ATTR(14)Roguelike Gallery - rlgallery.org$ATTR()",
55 "$DATETIME" = timeformat("%F %T")
56 ]
57
58 # From inside the jail, location of a banner file, which is
33 # shown in submenus that cannot be defined separately. 59 # shown in submenus that cannot be defined separately.
34 # Some string substitution is done for the file: 60 # Some string substitution is done for every banner file contents:
35 # $VERSION replaced with "dgamelaunch v" + dgl version number. 61 # - bannervars from above
36 # $SERVERID replaced with the server_id string, as defined above. 62 # - $VERSION replaced with "dgamelaunch v" + dgl version number.
63 # - $USERNAME replaced with logged-in user's name, or with "[Anonymous]"
64 # - $INCLUDE(filename) the named file will be inserted here.
37 banner = "/dgldir/dgl-banner" 65 banner = "/dgldir/dgl-banner"
38 66
39 # The following two options are fairly insecure. They will force us to 67 # The following two options are fairly insecure. They will force us to
40 # load the password/group database into memory while still having root 68 # load the password/group database into memory while still having root
41 # privileges. Replace them with shed_uid/shed_gid entries as soon as 69 # privileges. Replace them with shed_uid/shed_gid entries as soon as
49 #shed_user = "games" 77 #shed_user = "games"
50 # shed_group: group name to shed privileges to 78 # shed_group: group name to shed privileges to
51 #shed_group = "games" 79 #shed_group = "games"
52 80
53 # Preferably, you may use the respective gids/uids. This is for Debian: 81 # Preferably, you may use the respective gids/uids. This is for Debian:
54 # Use the rodney account instead of games:games
55 shed_uid = 501 82 shed_uid = 501
56 shed_gid = 501 83 shed_gid = 501
57 84
58 # The defaults are usually just fine for this. passwd refers to the file 85 # Locale. Leaving this out, dgamelaunch will not explicitly set locale.
59 # that stores the user database, and lockfile is only used internally by 86 locale = "en_US.UTF-8"
60 # dgamelaunch. 87
61 # passwd doesn't matter if dgl was compiled with SQLite, as the name of 88 # Default TERM, used if the user's $TERM is unknown.
62 # the sqlite database will be defined at compile time. 89 # If undefined, dgamelaunch will just terminate in that case.
63 passwd = "/dgldir/dgl-login" 90 default_term = "xterm"
64 lockfile = "/dgldir/dgl-lock" 91
92 # Should dgl send select-UTF8-charset escape code? (that is: ESC % G)
93 # default is no.
94 #utf8esc = yes
95
96 # Should dgl allow XON/XOFF? Default is "yes", meaning "don't touch it".
97 # "no" disables XON/XOFF
98 #flowcontrol = no
99
100 # Maximum time in seconds user can idle in the dgamelaunch menus
101 # before dgl exits. Default value is 0, which disables the idling timer.
102 # Does not apply to external programs or config editors.
103 # For setting game idle time, use max_idle_time in the game DEFINE.
104 # menu_max_idle_time = 1024
105
106 # Passwd refers to the file that stores the user database.
107 # The default passwd file is "/dgl-login" for flat-text database, and for
108 # sqlite, whatever value was defined for the sqlite database at compile time.
109 # This is also used for the shared memory key, if shmem is enabled at compile
110 # time.
111 #passwd = "/dgl-login"
112
113 # Lockfile is used only when dgl was compiled without sqlite.
114 #lockfile = "/dgl-lock"
65 115
66 # 116 #
67 # define some commands that are run when something happens. format is 117 # define some commands that are run when something happens. format is
68 # commands [ <time> ] = <command> ... 118 # commands [ <time> ] = <command> ...
69 # 119 #
70 # <time> can be one of: 120 # <time> can be one of:
71 # dglstart = when someone telnets in 121 # dglstart = when someone telnets in
72 # login = when user has logged in 122 # login = when user has logged in
73 # register = right after a new user is registered 123 # register = right after a new user is registered
74 # gamestart = just before a game is started 124 # gamestart = just before a game is started
125 # gameend = after a game ends (see also per-game "postcommand" define)
75 # 126 #
76 # <command> is: 127 # <command> is:
77 # mkdir "foo" = create a directory "foo" 128 # mkdir "foo" = create a directory "foo"
78 # chdir "foo" = change current work dir to "foo" 129 # chdir "foo" = change current work dir to "foo"
79 # cp "foo" "bar" = copy file "foo" to "bar", overwriting previous "bar" 130 # cp "foo" "bar" = copy file "foo" to "bar", overwriting previous "bar"
80 # ifnxcp "foo" "bar" = copy file "foo" to "bar", if "bar" doesn't exist 131 # ifnxcp "foo" "bar" = copy file "foo" to "bar", if "bar" doesn't exist
81 # unlink "foo" = delete file "foo" 132 # unlink "foo" = delete file "foo"
82 # setenv "foo" "bar" = set environment variable "foo" to "bar" 133 # setenv "foo" "bar" = set environment variable "foo" to "bar"
83 # exec "foo" "bar" = execute "foo" with "bar" as it's param 134 # exec "foo" "bar" = execute "foo" with "bar" as it's param
135 # rawprint "foo" = output string "foo"
84 # chpasswd = do the change password prompting, if logged in 136 # chpasswd = do the change password prompting, if logged in
85 # chmail = do the change email prompting, if logged in 137 # chmail = do the change email prompting, if logged in
86 # watch_menu = go to the watching menu 138 # watch_menu = go to the watching menu
87 # quit = quit dgl 139 # quit = quit dgl
88 # ask_login = do the login prompting, if not logged in 140 # ask_login = do the login prompting, if not logged in
89 # ask_register = do register new user prompting, if not logged in and 141 # ask_register = do register new user prompting, if not logged in and
90 # registration of new nicks is allowed. 142 # registration of new nicks is allowed.
91 # edit_options "foo" = edit options for game which has the short name "foo"
92 # (user must be logged in)
93 # play_game "foo" = start game which has the short name "foo" 143 # play_game "foo" = start game which has the short name "foo"
94 # (user must be logged in) 144 # (user must be logged in)
95 # submenu "foo" = go to submenu "foo" 145 # submenu "foo" = go to submenu "foo"
96 # return = return from submenu 146 # return = return from submenu
147 #
148 # NOTE: edit_options-command was removed. use ifnxcp and exec to simulate it.
97 # 149 #
98 # The commands will be done inside the chroot and with the uid and gid 150 # The commands will be done inside the chroot and with the uid and gid
99 # defined above. 151 # defined above.
100 # Parameters to the commands are subject to variable substitution: 152 # Parameters to the commands are subject to variable substitution:
101 # %r = dglroot, as defined above 153 # %r = dglroot, as defined above
102 # %n = user nick, if user is logged in 154 # %n = user nick, if user is logged in
155 # %N = first character of user name, if user is logged in
103 # %u = shed_uid, as defined above, but numeric 156 # %u = shed_uid, as defined above, but numeric
104 # %g = game name, if user has selected a game. 157 # %g = game name, if user has selected a game.
158 # %s = short game name, if user has selected a game.
159 # %t = ttyrec path & filename of the last game played.
160 #
161 # Also some escape codes:
162 # \\ = backslash
163 # \a = bell
164 # \b = backspace
165 # \e = escape character
166 # \f = form feed
167 # \n = newline
168 # \r = carriage return
169 # \t = tab
170 # \v = vertical tab
105 # 171 #
106 # eg. commands[login] = mkdir "foo", unlink "bar", setenv "Z" "foo" 172 # eg. commands[login] = mkdir "foo", unlink "bar", setenv "Z" "foo"
107 # 173 #
174
175 # Change the terminal title: (assuming terminals support the escape code)
176 #commands[dglstart] = rawprint "\e]2;nethack.alt.org\a"
108 177
109 # create the user's dirs when they register 178 # create the user's dirs when they register
110 commands[register] = mkdir "%ruserdata/%n", 179 commands[register] = mkdir "%ruserdata/%n",
111 mkdir "%rttyrec/%n", 180 mkdir "%rttyrec/%n",
112 mkdir "%rttyrec/%n/rogue3", 181 mkdir "%rttyrec/%n/rogue3",
121 mkdir "%rttyrec/%n/rogue4", 190 mkdir "%rttyrec/%n/rogue4",
122 mkdir "%rttyrec/%n/rogue5", 191 mkdir "%rttyrec/%n/rogue5",
123 mkdir "%rttyrec/%n/srogue", 192 mkdir "%rttyrec/%n/srogue",
124 mkdir "%rttyrec/%n/arogue5" 193 mkdir "%rttyrec/%n/arogue5"
125 194
195 # file mode for when commands copy files.
196 # readable and writable by all. you could use eg. "0644" to be more secure.
197 filemode = "0644"
126 198
127 199
128 200
129 201
130 # Define the main menus. 202 # Define the main menus.
132 # $VERSION and $SERVERID will be replaced, as per the bannerfile above. 204 # $VERSION and $SERVERID will be replaced, as per the bannerfile above.
133 205
134 # First, the menu shown to anonymous user: 206 # First, the menu shown to anonymous user:
135 menu["mainmenu_anon"] { 207 menu["mainmenu_anon"] {
136 bannerfile = "/dgldir/dgl_menu_main_anon.txt" 208 bannerfile = "/dgldir/dgl_menu_main_anon.txt"
209 cursor = (5,18)
137 commands["l"] = ask_login 210 commands["l"] = ask_login
138 commands["r"] = ask_register 211 commands["r"] = ask_register
139 commands["w"] = watch_menu 212 commands["w"] = watch_menu
140 commands["q"] = quit 213 commands["q"] = quit
141 } 214 }
143 # Then the menu shown when the user has logged in: 216 # Then the menu shown when the user has logged in:
144 # $USERNAME in here will be replaced with the user name. 217 # $USERNAME in here will be replaced with the user name.
145 menu["mainmenu_user"] { 218 menu["mainmenu_user"] {
146 # contents of this file are written to screen. 219 # contents of this file are written to screen.
147 # the file must be inside the chroot. 220 # the file must be inside the chroot.
221 # Some string subsitutions can be done in the file:
222 # $INCLUDE(filename) = includes the file to this file.
223 # String substitutions defined in bannervars-section above.
224 # $VERSION = dgamelaunch version
225 # $USERNAME = user name (or [Anonymous] if not logged in)
226 # $ATTR(params) = change text color and attributes.
227 # params can be either number (to set the text color),
228 # one, or any of "b" (bold), "s" (standout), "u" (underline),
229 # "r" (reverse) or "d" (dim),
230 # or both color number and attribute characters, separated by colon.
231 # Empty param resets color and attributes to default.
148 bannerfile = "/dgldir/dgl_menu_main_user.txt" 232 bannerfile = "/dgldir/dgl_menu_main_user.txt"
149 # after which cursor is moved to this location 233 # after which cursor is moved to this location
150 # if cursor-definition is missing, the cursor is put 234 # if cursor-definition is missing, the cursor is put
151 # to the end of the last line of the banner. 235 # to the end of the last line of the banner.
152 # cursor = (5,18) 236 # cursor = (5,18)
168 menu["watchmenu_help"] { 252 menu["watchmenu_help"] {
169 bannerfile = "/dgldir/dgl_menu_watchmenu_help.txt" 253 bannerfile = "/dgldir/dgl_menu_watchmenu_help.txt"
170 commands["qQ "] = return 254 commands["qQ "] = return
171 } 255 }
172 256
257 # Rogue V3: short and simple, like the game
258 DEFINE {
259 game_path = "/bin/rogue3"
260 game_name = "Rogue V3 (3.6)"
261 short_name = "RogV3"
262
263 game_args = "/bin/rogue3", "-n", "%n"
264
265 inprogressdir = "%rinprogress-rogue3/"
266 ttyrecdir = "%rttyrec/%n/rogue3/"
267
268 # Don't do anything with rcfiles. Rogue has none.
269
270 # Back up the savefile, just in case
271 commands = cp "/var/games/roguelike/rogue3save/%u-%n.r3sav" "%rbackup/%u-%n.r3sav.bak"
272 }
273
274 # Rogue V4: just like it, but a little different
275 DEFINE {
276 game_path = "/bin/rogue4"
277 game_name = "Rogue V4 (5.2)"
278 short_name = "RogV4"
279
280 game_args = "/bin/rogue4", "-n", "%n"
281 inprogressdir = "%rinprogress-rogue4/"
282 ttyrecdir = "%rttyrec/%n/rogue4/"
283
284 commands = cp "/var/games/roguelike/rogue4save/%u-%n.r4sav" "%rbackup/%u-%n.r4sav.bak"
285 }
286
287 # Rogue V5: a little more different from both
288 DEFINE {
289 game_path = "/bin/rogue5"
290 game_name = "Rogue V5 (5.4)"
291 short_name = "RogV5"
292
293 game_args = "/bin/rogue5", "-n", "%n"
294 inprogressdir = "%rinprogress-rogue5/"
295 ttyrecdir = "%rttyrec/%n/rogue5/"
296
297 commands = cp "/var/games/roguelike/rogue5save/%u-%n.r5sav" "%rbackup/%u-%n.r5sav.bak"
298 }
299
300 # Super-Rogue: different?
301 DEFINE {
302 game_path = "/bin/srogue"
303 game_name = "Super-Rogue"
304 short_name = "SRog"
305
306 game_args = "/bin/srogue", "-n", "%n"
307 inprogressdir = "%rinprogress-srogue/"
308 ttyrecdir = "%rttyrec/%n/srogue/"
309
310 commands = cp "/var/games/roguelike/sroguesave/%u-%n.srsav" "%rbackup/%u-%n.srsav.bak"
311 }
312
313 # Advanced Rogue 5: not different?
314 DEFINE {
315 game_path = "/bin/arogue5"
316 game_name = "Advanced Rogue 5"
317 short_name = "ARog5"
318
319 game_args = "/bin/arogue5", "-n", "%n"
320 inprogressdir = "%rinprogress-arogue5/"
321 ttyrecdir = "%rttyrec/%n/arogue5/"
322
323 commands = cp "/var/games/roguelike/arogue5save/%u-%n.ar5sav" "%rbackup/%u-%n.ar5sav.bak"
324 }
325
173 326
174 # Next, we'll define one game's data: 327 # Next, we'll define one game's data:
175 328
176 #DEFINE { 329 #DEFINE {
177 # # From inside the jail, the location of the binary to be launched. 330 # # From inside the jail, the location of the binary to be launched.
194 # spooldir = "/var/mail/" 347 # spooldir = "/var/mail/"
195 # 348 #
196 # # From inside the jail, the default .nethackrc that is copied for new users. 349 # # From inside the jail, the default .nethackrc that is copied for new users.
197 # # rc_template = "/dgl-default-rcfile" 350 # # rc_template = "/dgl-default-rcfile"
198 # 351 #
352 # # If player idles longer than max_idle_time seconds, the game will
353 # # receive a sighup. Default value is 0, which disables the idling timer.
354 # max_idle_time = 2000
355 #
356 # # Player-specific path to an extra information file written by the game
357 # # The game should write the extra information on one line in this format:
358 # # <numeric-weight>|extra-information
359 # # For example, the game might write: "100|Astral", "1|D:1", etc. to indicate
360 # # where the player is in the game world. The numeric weight is used when
361 # # a spectator sorts games by the extra information field: higher weights
362 # # will be sorted to appear before lower weights.
363 # #
364 # extra_info_file = "%rgamedir/%n.extrainfo"
365 #
199 # # Make sure the inprogress dir actually exists. default is "inprogress/" 366 # # Make sure the inprogress dir actually exists. default is "inprogress/"
200 # # Each game you define here must have it's own. 367 # # Each game you define here must have it's own.
201 # inprogressdir = "%rinprogress-nethackstub/" 368 # inprogressdir = "%rinprogress-nethackstub/"
202 # 369 #
203 # # We can also define per-game commands, that are executed 370 # # We can also define per-game commands, that are executed
204 # # when the game starts: 371 # # when the game starts:
205 # # commands = chdir "/dgldir", mkdir "foo_%u_%g" 372 # # commands = chdir "/dgldir", mkdir "foo_%u_%g"
373 #
374 # # We can also define per-game commands executed after the game ends,
375 # # but before commands[gameend]
376 # postcommands = chdir "/"
377 #
378 # # If the game uses an ancient encoding, you may specify "ibm" or "dec".
379 # # If set to "ask", the game will be run with --print-charset beforehand,
380 # # expected to return one of these values.
381 # encoding = "unicode"
206 #} 382 #}
207 383
384
385 #
386 # the second game
387 #
388 #
208 389
209 #DEFINE { 390 #DEFINE {
210 # game_path = "/nh343/nethack" 391 # game_path = "/nh343/nethack"
211 # game_name = "NetHack 3.4.3" 392 # game_name = "NetHack 3.4.3"
212 # short_name = "NH343" 393 # short_name = "NH343"
235 # setenv "SIMPLEMAIL" "1", 416 # setenv "SIMPLEMAIL" "1",
236 # # don't let the mail file grow 417 # # don't let the mail file grow
237 # unlink "/mail/%n" 418 # unlink "/mail/%n"
238 #} 419 #}
239 420
240 # Rogue V3: short and simple, like the game 421 #
241 DEFINE { 422 # third game
242 game_path = "/bin/rogue3" 423 #
243 game_name = "Rogue V3 (3.6)" 424 #
244 short_name = "RogV3" 425
245 426 #DEFINE {
246 game_args = "/bin/rogue3", "-n", "%n" 427 # game_path = "/bin/crawlss017"
247 428 # game_name = "Crawl Stone Soup 0.1.7"
248 inprogressdir = "%rinprogress-rogue3/" 429 # short_name = "Cr017"
249 ttyrecdir = "%rttyrec/%n/rogue3/" 430 #
250 431 # game_args = "/bin/crawlss017",
251 # Don't do anything with rcfiles. Rogue has none. 432 # "-name", "%n",
252 433 # "-dir", "/crawlss017/",
253 # Back up the savefile, just in case 434 # "-rc", "%rrcfiles/%n.crawlrc",
254 commands = cp "/var/games/roguelike/rogue3save/%u-%n.r3sav" "%rbackup/%u-%n.r3sav.bak" 435 # "-morgue", "/crawlss017/morgues/",
255 } 436 # "-macro", "/crawlss017/macros/%n.macro"
256 437 #
257 # Rogue V4: just like it, but a little different 438 # rc_template = "/dgl-default-rcfile.crawl"
258 DEFINE { 439 # rc_fmt = "%rrcfiles/%n.crawlrc"
259 game_path = "/bin/rogue4" 440 # inprogressdir = "%rinprogress-crawlss017/"
260 game_name = "Rogue V4 (5.2)" 441 # encoding = ask
261 short_name = "RogV4" 442 #}
262 443
263 game_args = "/bin/rogue4", "-n", "%n" 444 #
264 inprogressdir = "%rinprogress-rogue4/" 445 # fourth game
265 ttyrecdir = "%rttyrec/%n/rogue4/" 446 #
266 447 #
267 commands = cp "/var/games/roguelike/rogue4save/%u-%n.r4sav" "%rbackup/%u-%n.r4sav.bak" 448
268 } 449 #DEFINE {
269 450 # game_path = "/bin/crawlss020"
270 # Rogue V5: a little more different from both 451 # game_name = "Crawl Stone Soup 0.2.0"
271 DEFINE { 452 # short_name = "Cr020"
272 game_path = "/bin/rogue5" 453 #
273 game_name = "Rogue V5 (5.4)" 454 # game_args = "/bin/crawlss020",
274 short_name = "RogV5" 455 # "-name", "%n",
275 456 # "-dir", "/crawlss020/",
276 game_args = "/bin/rogue5", "-n", "%n" 457 # "-rc", "/crawlss020/plr/%n/%n.crawlrc",
277 inprogressdir = "%rinprogress-rogue5/" 458 # "-morgue", "/crawlss020/plr/%n/",
278 ttyrecdir = "%rttyrec/%n/rogue5/" 459 # "-macro", "/crawlss020/plr/%n/"
279 460 #
280 commands = cp "/var/games/roguelike/rogue5save/%u-%n.r5sav" "%rbackup/%u-%n.r5sav.bak" 461 # rc_template = "/dgl-default-rcfile.crawl"
281 } 462 # rc_fmt = "/crawlss020/plr/%n/%n.crawlrc"
282 463 # inprogressdir = "%rinprogress-crawlss020/"
283 # Super-Rogue: different? 464 #}
284 DEFINE {
285 game_path = "/bin/srogue"
286 game_name = "Super-Rogue"
287 short_name = "SRog"
288
289 game_args = "/bin/srogue", "-n", "%n"
290 inprogressdir = "%rinprogress-srogue/"
291 ttyrecdir = "%rttyrec/%n/srogue/"
292
293 commands = cp "/var/games/roguelike/sroguesave/%u-%n.srsav" "%rbackup/%u-%n.srsav.bak"
294 }
295
296 # Advanced Rogue 5: not different?
297 DEFINE {
298 game_path = "/bin/arogue5"
299 game_name = "Advanced Rogue 5"
300 short_name = "ARog5"
301
302 game_args = "/bin/arogue5", "-n", "%n"
303 inprogressdir = "%rinprogress-arogue5/"
304 ttyrecdir = "%rttyrec/%n/arogue5/"
305
306 commands = cp "/var/games/roguelike/arogue5save/%u-%n.ar5sav" "%rbackup/%u-%n.ar5sav.bak"
307 }