From: Pasi Kallinen Date: Wed, 21 Oct 2009 09:06:44 +0000 (+0000) Subject: Remove the "unsorted" watch-menu sort method, and make "username" the default. X-Git-Tag: v1.6.1-roc-dev~199 X-Git-Url: https://skyeroc.xyz/gitweb/?a=commitdiff_plain;h=4a76ab573394e34b88c0918148fdebf198113b9f;p=dgamelaunch Remove the "unsorted" watch-menu sort method, and make "username" the default. git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@510 db0b04b0-f4d1-0310-9a6d-de3e77497b0e --- diff --git a/TODO b/TODO index ee11653..87ea408 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,13 @@ +-for menu definitions, allow "default" commands (when user presses a + key not defined in other commands): + commands[default] = ... + +-in watching-menu "The following games are in progress:" should change + depending if there's only 1 game. It should also list the # of games. +-in watching-menu, maybe we shouldn't pick players who have been + idle for too long when randomly choosing one to watch. +-change dgl-banner handling; we only use the top line of it nowadays... + (maybe make that info config line: bannerline = "## $SERVERID" or something) -allow the admin to config the watching menu: -top banner -bottom banner @@ -10,7 +20,10 @@ col 0=selectletter, 1=playername, 2=gamenum, 3=termsize, 4=startdate, 5=starttime, 6=idletime -set default sort method - + -selectorchars: + watch_selectorchars = "abcdefghijklmn" (a-zA-Z, minus qQ) + -keys: + currently: qQ=return, '.'=sort++, ','=sort--, etc -allow admin to set per-game "extra info" file, extrainfofile = "/nh343/var/extrainfo/%n.xtranfo" contents of which are shown in the watching menu as info-column. diff --git a/config.y b/config.y index 065a783..56fbbba 100644 --- a/config.y +++ b/config.y @@ -155,7 +155,7 @@ KeyPair: TYPE_CMDQUEUE '[' TYPE_CMDQUEUENAME ']' { int tmpi, okay = 0; - for (tmpi = 0; tmpi < NUM_SORTMODES; tmpi++) + for (tmpi = (SORTMODE_NONE+1); tmpi < NUM_SORTMODES; tmpi++) if (!strcasecmp(SORTMODE_NAME[tmpi], $3 )) { globalconfig.sortmode = tmpi; okay = 1; diff --git a/dgamelaunch.c b/dgamelaunch.c index 3183591..a7ef88b 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -559,11 +559,11 @@ inprogressmenu (int gameid) return; case '.': - if (sortmode < (NUM_SORTMODES-1)) sortmode++; else sortmode = SORTMODE_NONE; + if (sortmode < (NUM_SORTMODES-1)) sortmode++; else sortmode = SORTMODE_USERNAME; break; case ',': - if (sortmode > 0) sortmode--; else sortmode = (NUM_SORTMODES-1); + if (sortmode > SORTMODE_USERNAME) sortmode--; else sortmode = (NUM_SORTMODES-1); break; case 12: case 18: /* ^L, ^R */ diff --git a/dgl-common.c b/dgl-common.c index 7a4e517..6158dac 100644 --- a/dgl-common.c +++ b/dgl-common.c @@ -648,7 +648,7 @@ create_config () globalconfig.shed_uid = (uid_t)-1; globalconfig.shed_gid = (gid_t)-1; - globalconfig.sortmode = SORTMODE_NONE; + globalconfig.sortmode = SORTMODE_USERNAME; if (config) { diff --git a/examples/dgamelaunch.conf b/examples/dgamelaunch.conf index 95c31a2..1bf44d1 100644 --- a/examples/dgamelaunch.conf +++ b/examples/dgamelaunch.conf @@ -20,8 +20,8 @@ allow_new_nicks = yes maxnicklen = 10 # Set the default watching-screen sorting mode. Can be one of -# "unsorted", "username", "game", "windowsize", "starttime" or "idletime". -# Unsorted is the default. +# "username", "game", "windowsize", "starttime" or "idletime". +# "username" is the default. #sortmode = "username" # Path to a prepared chroot jail.