Author Topic: List Source  (Read 1559 times)

Zorchenhimer

  • Autococker
  • Posts: 2614
List Source
« on: March 15, 2007, 05:53:16 PM »
How would I go about retrieving a list from a file for use in a field widget? I'm almost certain it's possible because the 'join server' menu does something similar to what I want to do. Any ideas?

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: List Source
« Reply #1 on: March 15, 2007, 06:17:58 PM »
The join server menu is a special case.  The serverlist list widget is the only one that can be used for serverlists, and those are controlled by the serverlist_source, serverlist_source2, and serverlist_source3 cvars.  In build 16, they can only be http lists.  Build 17 supports file lists (for example, you can set it to something like "c:\somelist.txt").  Build 18 is switching over to a UDP based serverlist system, though, which requires a special master server specified by the serverlist_udp_source cvar.  The others will probably no longer be used.

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: List Source
« Reply #2 on: March 15, 2007, 07:08:09 PM »
So will I be able to have a "thelist_source" cvar in my configs and have "listsource thelist" in my menu? Or is that kind of thing hard-coded?

{appy Hamper

  • VM-68
  • Posts: 128
Re: List Source
« Reply #3 on: March 15, 2007, 08:08:00 PM »
Zorch asked before I could...

One thing I did think of but did not try yet:  how does the program read the .cfg file with the order of maps to be played?  (I cannot remember of the name of that stupid file right now for the life of me.)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: List Source
« Reply #4 on: March 15, 2007, 09:47:03 PM »
Hamper: The rotation file?  I think the cvar is rot_file.  It should be in the example server.cfg.

Zorch: What exactly are you trying to do?  I don't think there will be more than one UDP serverlist source, so there's not really any sense in  being able to configure it, and letting people configure it might lead to people breaking stuff. :P

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: List Source
« Reply #5 on: March 15, 2007, 10:11:04 PM »
Well, I'm not going to use it for a serverlist. I'm working off of {appy's idea for organizing maps (siege, favorite, pong, etc.). The way {appy is doing it is copying all of the siege to a 'siege' folder for a reference for a select widget (I meant 'select' in my first post btw), but have it actually open the map in the maps folder. I found that this also works if you, instead of having 2 copies of every map, have a blank file with a map's name for the select widget to reference. However, to make things even better, can I just have a list of all the siege maps in one file, favorites in another, etc., and avoid hundreds of empty files?

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: List Source
« Reply #6 on: March 15, 2007, 11:10:54 PM »
Well, you can have contents in a list within the menu file, but not load the list from a separate file.

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: List Source
« Reply #7 on: March 16, 2007, 07:56:13 AM »
...drat...