]> skyeroc.xyz Git - dgamelaunch/commitdiff
Remove the "unsorted" watch-menu sort method, and make "username" the default.
authorPasi Kallinen <paxed@alt.org>
Wed, 21 Oct 2009 09:06:44 +0000 (09:06 +0000)
committerPasi Kallinen <paxed@alt.org>
Wed, 21 Oct 2009 09:06:44 +0000 (09:06 +0000)
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@510 db0b04b0-f4d1-0310-9a6d-de3e77497b0e

TODO
config.y
dgamelaunch.c
dgl-common.c
examples/dgamelaunch.conf

diff --git a/TODO b/TODO
index ee1165375d2ba1cb1a85feac6395cb9464a94f4c..87ea4086dc66085297768abdcfa5c7da974d23e8 100644 (file)
--- 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
        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.
index 065a783889528f7f316d2b3be2bb634e6b11be37..56fbbba4975c1e0f332372f0f06a446987cb00e9 100644 (file)
--- 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;
index 31835919d1a967c85152821d738a07e6f58dba52..a7ef88b9ff20847386f1ca1e836a251dbc65191b 100644 (file)
@@ -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 */
index 7a4e517984609ea058c96158f39358302d229c77..6158dac305c9275c38a8d4342f94990d7c5144ca 100644 (file)
@@ -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)
   {
index 95c31a2954f59f04f5d673237cb7f8a8f278eda8..1bf44d16cacb946494a57447c158fdbd02e8f195 100644 (file)
@@ -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.