• Print

Author Topic: Reserved Slots brainstorm  (Read 11 times)

0 Members and 1 Guest are viewing this topic.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Reserved Slots brainstorm
« on: January 15, 2007, 12:21:33 am »
I know we have an open feedback on Mantis, but I felt the forum was a better discussion area.
My idea for reserved slots is as follows (yes Megiddo, your question about sv_visiblemaxplayers on Mantis helped lead to it)

I've found that sv_visiblemaxplayers can be changed at anytime, unlike maxplayers which as you know has to be set at server startup.
Basic flow is as follows.
User sets in server.ini how many slots. ulx reservedslots, (and possibly what 'group' is allowed to take a slot/join)
When server starts, sv_visiblemaxplayers = maxplayers - ulx_reservedslots
When admin joins, sv_visiblemaxplayers = sv_visiblemaxplayers + 1 (an admin joined, therefore filling a slot)
If any non-admin user joins that makes current # players > sv_visiblemaxplayers, they get kicked (this means they probably used the console to connect)
Once enough admins join that fill ulx reservedslots, its back to every person for themselves, and sv_visiblemaxplayers  = maxplayers.

Above holds true in reverse as admins in reservedslots leave of course. sv_visiblemaxplayers would decrease.

One additional option to add might be group precedence. Say server.ini has whether or not a certain group (superadmins, etc) can fill reserved slots.
If wanted, this could even become a per adminuser setting. I have 4 superadmins, 3 of which I'd reserve slots for. This would allow the server hosts to decide who was worthy. :)
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline spbogie

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 456
  • Karma: 41
Re: Reserved Slots brainstorm
« Reply #1 on: January 15, 2007, 08:19:20 am »
As far as designating which players get reserved access, just add another group "resereved".

The only problem I see with your setup is that it forces the other admins to use "connect" to join if the open slots are full. I suppose this isn't a major problem, but it may bug some admins. Perhapse we could make the sv_visiblemaxplayers an optional feature.
I have not failed. I've just found 10,000 ways that won't work. - Thomas A. Edison
I reject your reality and substitute my own. - Adam Savage

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Reserved Slots brainstorm
« Reply #2 on: January 15, 2007, 10:42:46 am »
Yes, I forgot to mention that requirement of admins. (It was 330am, and I'd been up 17 hours straight) ( Don't ask :/ )
Some might consider this too annoying. Adding the option would be good.

Though, could a client side menu be made to do this, use the console to connect?
From what I understand, when a client connects to a ULX server, the client side files are downloaded.
These files are written so that they only work when connected to a ULX server, correct?
Am I also to understand that, if not written this way, certain parts of script (ULX in this case) could still run client side without being connected to a server?

Here is where I'm going with this.
User connects to a ULX server. Client side files are downloaded.
If user gets added as admin, either at connect (because admin preconfigured), or during game, ULX client side detects "Hey, you're an admin on this server!" and writes a data file with name/ip/port/ of server.
Once that list is made, client could execute "ulx slist" that would show a menu of the servers he's an admin of, that in effect would allow one click access to connecting through console.

The only caveat I can think of right now is how to deal with dynamic ips. I really wish Source had some unique identifier to identify servers, say a hex key value or similiar, that didn't change (at least, rarely) and could be used to find/connect to the server with that key no matter its ip.
Perhaps in the mean time, just add a warning saying "sorry, that server seems to have changed ip address. If you can see the server in the list, connect manually, and ULX will update your data file"

Here is where Megiddo usually comes out with a much smaller simpler idea that works just as if not better than mine.
I'm good at getting gears turning. :)


"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Reserved Slots brainstorm
« Reply #3 on: January 15, 2007, 11:33:11 am »
The lua engine isn't initialized until you start or connect to a server. :(
Experiencing God's grace one day at a time.

  • Print