Author Topic: sv_maxPing override for admins  (Read 8506 times)

Amanieu

  • Posts: 647
  • Turrets: +135/-83
    • Amanieu
sv_maxPing override for admins
« on: October 11, 2007, 04:25:26 pm »
I am planning on making a patch which will allow players which have a specific admin flag to override server max ping restrictions.

This is a really big problem for me because I live in China and my ping is so high I can't even join my own clan server. :(

Please feel free to post any comments.

Now for the technical part:

Since g_admin is implemented in the qvm, the server code will need to ask the qvm whether to accept the player or not. The problem is that the ping is checked before the qvm is called with ClientConnect. I have thought of the following solutions:

1) Append the player's ping to the arguments to the ClientConnect VMCall. This has the disadvantage of having to remove normal ping checks, and if the qvm does not have ping check in it, there will be no ping checks at all.

2) Create a dedicated CheckPing VMCall. This has the disadvantage of being harder to code, slower and bulky, but a regular ping check can still be done if the VMCall doesn't exist, because it will return -1, which can't be done with the previous method.

Please post any suggestions you may have.
Thank you in advance.
Quote
< kevlarman> zakk is getting his patches from shady frenchmen on irc
< kevlarman> this can't be a good sign :P

Caveman

  • Guest
sv_maxPing override for admins
« Reply #1 on: October 11, 2007, 05:32:48 pm »
I am sure that there are ping-times even unlagged can't cope with.
So make sure to check that out before you start coding :)

Killjoy#1

  • Guest
sv_maxPing override for admins
« Reply #2 on: October 11, 2007, 05:33:13 pm »
I think theres a thing on the server thing were you can set a password for saved spots on a server. idk Its been a while since Ive took a look at my server. (its hates me but IT WORKS! kind of...)

Caveman

  • Guest
sv_maxPing override for admins
« Reply #3 on: October 11, 2007, 06:40:41 pm »
Killjoy, would you please be so kind to at least get a minimal clue when you open your pie-hole?

HamStar

  • Posts: 458
  • Turrets: +128/-27
sv_maxPing override for admins
« Reply #4 on: October 11, 2007, 07:28:14 pm »
Quote from: "Killjoy#1"
I think theres a thing on the server thing were you can set a password for saved spots on a server. idk Its been a while since Ive took a look at my server. (its hates me but IT WORKS! kind of...)


Once again, self ownage is the sweetest ownage.

Amanieu

  • Posts: 647
  • Turrets: +135/-83
    • Amanieu
sv_maxPing override for admins
« Reply #5 on: October 12, 2007, 01:39:22 am »
Killjoy#1: ping is check before passwords, so you will be kicked before the server even sees your password.

Caveman: That is why I am not completely removing ping checks. I think you can still play reasonably with pings of up to 400 IF YOU ARE A GOOD PLAYER. This is why I think at least clan members should be able to override max ping restrictions. But allowing a player which has 700 ping is useless because he won't be able to play anyways.

HamStar: Sweet  :D
Quote
< kevlarman> zakk is getting his patches from shady frenchmen on irc
< kevlarman> this can't be a good sign :P

n00b pl0x

  • Posts: 2412
  • Turrets: +55/-168
sv_maxPing override for admins
« Reply #6 on: October 12, 2007, 02:29:21 am »
IDK CANNIBOWNAGE IS PRETTY SWEET TOO
will sort out my sig, or I will get banned.

HOW DO I SORTED SIG?

Amanieu

  • Posts: 647
  • Turrets: +135/-83
    • Amanieu
sv_maxPing override for admins
« Reply #7 on: October 12, 2007, 10:44:40 am »
I worked on both possibilities and posted my patches on:
http://www.mercenariesguild.net/patches/?do=details&task_id=101
Quote
< kevlarman> zakk is getting his patches from shady frenchmen on irc
< kevlarman> this can't be a good sign :P

Lakitu7

  • Tremulous Developers
  • *
  • Posts: 1002
  • Turrets: +120/-73
sv_maxPing override for admins
« Reply #8 on: October 12, 2007, 05:47:15 pm »
I like this idea, although the requirement of having to mod /server means that it can't be used without a special tremded, which means unfortunately less usage.

You should patch against latest svn revision and submit to bugzilla so that it has a chance of showing up in trunk.

I would also question if it's necessary to turn this on/off per-admin, thus adding yet another admin.dat flag. I'd probably just turn the feature on/off as a whole via a g_whatever cvar. Taking another letter seems a bit unnecessary.

Caveman

  • Guest
sv_maxPing override for admins
« Reply #9 on: October 12, 2007, 06:01:40 pm »
Isn't there a ping-time at which all player will be lagged?
I know unlagged tried to work around this, but imho there are limits that just can't be broken.

benmachine

  • Posts: 915
  • Turrets: +99/-76
    • ben's machinery
sv_maxPing override for admins
« Reply #10 on: October 12, 2007, 10:51:31 pm »
Quote from: "Caveman"
Isn't there a ping-time at which all player will be lagged?
I know unlagged tried to work around this, but imho there are limits that just can't be broken.

Well yes, but if you are an admin it is assumed you are sufficiently responsible to work these out yourself. Furthermore, it's generally possible to get a !kick or !ban through even with pings of about 1000msec, so even if you don't plan on actually *playing* you can still be of use.
benmachine

Caveman

  • Guest
sv_maxPing override for admins
« Reply #11 on: October 12, 2007, 11:01:52 pm »
Quote from: "benmachine"

Well yes, but if you are an admin it is assumed you are sufficiently responsible to work these out yourself.


With servers cropping up like a firestorm I strongly doubt the majority to be that responsible.

Quote from: "benmachine"

Furthermore, it's generally possible to get a !kick or !ban through even with pings of about 1000msec, so even if you don't plan on actually *playing* you can still be of use.


That is what I am not sooo sure about, iirc even specs with a high ping could lag the server.

But anyways, as soon as the server lags, the players will complain or leave and thus make this discussion moot :)

Amanieu

  • Posts: 647
  • Turrets: +135/-83
    • Amanieu
sv_maxPing override for admins
« Reply #12 on: October 13, 2007, 06:58:54 am »
Lakitu7: Before I send it to bugzilla I would like to know which option is better. And maybe a cvar like this: g_pingOverride = minimum admin level required to override ping restrictions.

Caveman:
Quote
That is what I am not sooo sure about, iirc even specs with a high ping could lag the server.

I'm not sure but I don't think so, because if so the !spec999 command would be just about useless. And also specs don't affect the game, so there is no interaction which could be affected by lag.

And as a general response:
Does anyone have a suggestion on which option would better?
Quote
< kevlarman> zakk is getting his patches from shady frenchmen on irc
< kevlarman> this can't be a good sign :P

Lakitu7

  • Tremulous Developers
  • *
  • Posts: 1002
  • Turrets: +120/-73
sv_maxPing override for admins
« Reply #13 on: October 13, 2007, 09:12:49 am »
I personally tend to prefer g_whatever = minimum level to do something since it keeps admin.dat clutter down to things that might need more precision in rights assignment and doesn't take a symbol that could be better used later.

However, I don't think anything with that sort of system has gotten into SVN so I'm not sure how it affects such a thing's chances. It's pretty trivial to do it both ways and submit a patch for each, so I would do that and let the devs decide which, if either, they like.

Caveman

  • Guest
sv_maxPing override for admins
« Reply #14 on: October 13, 2007, 11:36:12 am »
Quote from: "Amanieu"

!spec999 command would be just about useless. And also specs don't affect the game, so there is no interaction which could be affected by lag.

And as a general response:
Does anyone have a suggestion on which option would better?


Ok, I stand corrected. I didn't think about that :)

And I also tend to couple the override with a minimum level, on our servers I'd prolly set it to lvl4 (our members)...

Amanieu

  • Posts: 647
  • Turrets: +135/-83
    • Amanieu
sv_maxPing override for admins
« Reply #15 on: October 13, 2007, 11:42:00 am »
Now I have 4 different patches:
- New VMCall & cvar
- New VMCall & admin flag
- Use old VMCall & cvar
- Use old VMCall & admin flag

Which should be discarded and which should be kept?

I think I should let the devs decide for the VMCall, but your opinions are still welcome. But note that, if using the old VMCall, since ping check has been removed from tremded, if the qvm used doesn't do ping check (for example a server owner wanted to use a custom precomipled qvm), then players with any pings can get in.

By the way if you wanted override for just level 4 & 5 just give those levels the admin flag, the result would be the same, and I think that an extra cvar is less practical than an extra admin flag.
Quote
< kevlarman> zakk is getting his patches from shady frenchmen on irc
< kevlarman> this can't be a good sign :P