Patch for status command

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Sun Nov 23, 2008 11:12 pm

  • I've fixed status command. Now it's nicer to see, more readable and it displays the complete names (no more truncated tags).

    The patch for this command is needed also to display more chars in names with lots of new color tags that I did. A name like ^xf00t^x0f0e^xf00r^x0f0ence ^4hill without this patch is shown with only 3 chars (a part the horrible truncated tag...): ter^xf0

    Download link: http://sites.google.com/site/terencehill/Nexuiz/status.patch

    And don't forget, this patch works only in your own server.

    Image
    User avatar
    terencehill
    Alien
     
    Posts: 176
    Joined: Thu Jul 10, 2008 10:33 pm
    Location: Italy

Tue Nov 25, 2008 7:01 am

  • I really am not sure whether this can be applied, or whether the output of the "status" command must stay the same to be compatible with other quake engines (some engines issue that command in the background, and parse its output).

    However, there is a new command "cmd teamstatus" which shows a more detailed scoreboard than status. Maybe there could be a similar command that doesn't focus on the scores, but on ping and packetloss, and is also some "cmd". It could be aliased to "st" then...
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Tue Nov 25, 2008 7:37 am

  • Doesn't dp have own networking protocol?
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Tue Nov 25, 2008 9:17 am

  • Yes, but:

    1. it also parses "status" replies (for darkplaces_iplog.txt)

    2. it does support acting as a Quake server, and people actually do that and connect with other Quake engines to DP. Your status patch currently breaks that.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Tue Nov 25, 2008 10:54 am

  • Maybe it would be possible to differentiate output based on the protocol:
    old status if protocol == NQ or QW and new status if protocol == DP. Problems would arise if other engines support DP protocol too and use status to parse info. Same goes for qstat.
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Tue Nov 25, 2008 11:01 am

  • probably just creating a new command will be way easier
    Asraniel
    Alien
     
    Posts: 112
    Joined: Tue Feb 28, 2006 9:15 pm

Tue Nov 25, 2008 4:59 pm

  • The problem in the current status command is that is actually unreadable.

    You use it when u want to know or the ip of a player, or his number, to kick him or simply to send him a private message.

    Therefore the command "cmd teamstatus" is unuseful for this goal.

    But I've understood, this patch can't be applied, so I guess the things will stay as they are.
    User avatar
    terencehill
    Alien
     
    Posts: 176
    Joined: Thu Jul 10, 2008 10:33 pm
    Location: Italy

Tue Nov 25, 2008 5:04 pm

  • terencehill wrote:But I've understood, this patch can't be applied, so I guess the things will stay as they are.


    But there's no reason another command can't be aliased, like 'superstatus'. The concern is just with breaking current systems.
    User avatar
    [-z-]
    Site Admin and Nexuiz Ninja
     
    Posts: 1794
    Joined: Mon Nov 13, 2006 12:20 am
    Location: Florida

Wed Dec 10, 2008 7:49 pm

  • BY prompt of esteel, I've done a patch to the status command to displays in other 2 differents ways the informations on players playing in the current server, as the default way is very chaotic and unreadable. Now it's nicer to see, more readable and it displays the complete names (no more truncated tags).
    So now the default command is still available, but if you put after status the number 1 or 2 you have 2 other different layouts.

    * status 1 shows an extended layout with many infos,
    * status 2 shows a semplified layout with the more importants infos.

    Using these 2 new commands, the IPs of players are not stored in the file darkplaces_iplog.txt.

    status 0 works in the same way as status.

    Screenshot: http://sites.google.com/site/terencehill/Nexuiz/status_v2.jpg

    Using parameters other than 0, 1 or 2, or using more parameters, it prints nothing.

    The status command is server side so the patch can be tried only in your own server.

    Download the patch here: http://sites.google.com/site/terencehill/Nexuiz/status_v2.patch.
    User avatar
    terencehill
    Alien
     
    Posts: 176
    Joined: Thu Jul 10, 2008 10:33 pm
    Location: Italy

Wed Dec 10, 2008 9:11 pm

  • Finally, no reason not to implement it. Congrats and thanks.
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Sat Dec 13, 2008 2:07 pm

  • Hey, I just made a quick reading at your code, here my comments:

    Don't you cast hours as integers ?

    I'd rather to check in just one place if the argument for status goes out of bounds (>2), if that is the case then you can answer with some default (like plain status or "status 1"). This way the code will be just a little bit cleaner and easier to maintain.

    I haven't patched my SVN copy yet, I'll do it later and come back with comments.

    Cheers
    User avatar
    mand1nga
    Alien trapper
     
    Posts: 321
    Joined: Mon May 12, 2008 12:19 am

Sat Dec 13, 2008 5:28 pm

  • Don't you cast hours as integers ?

    I didn't touch the code to show the time.

    I'd rather to check in just one place if the argument for status goes out of bounds (>2), if that is the case then you can answer with some default (like plain status or "status 1"). This way the code will be just a little bit cleaner and easier to maintain.

    As i wrote, I've chosen this option: "Using parameters other than 0, 1 or 2, or using more parameters, it prints nothing.", since the previous behavior of status was to print nothing if any argument was given.
    User avatar
    terencehill
    Alien
     
    Posts: 176
    Joined: Thu Jul 10, 2008 10:33 pm
    Location: Italy

Sat Dec 13, 2008 6:53 pm

  • That's good already. It sure will go in, as there is indeed no reason against now, and this code shouldn't be breaking anything (I haven't read it yet though, might need some cleaning up).

    Now all you need is to do aesthetics... maybe make the colors look better... only such stuff left.

    But why does it show an IP for your bots, and not "botclient"? That looks like a bug :P

    BTW, status 1 looks good to parse. Maybe make it look less blinding by the colors (use less colors, that is)... then it could even become a new "standard" among quake engines (that be DP and FTE only, though). It also is fully and simply parsable (nicknames at the end, anything else is easily to find by word splitting).
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sat Dec 13, 2008 10:16 pm

  • But why does it show an IP for your bots, and not "botclient"? That looks like a bug Razz

    I've changed simply the code during the tests to show an IP instead of botclient.

    Maybe make it look less blinding by the colors (use less colors, that is)...

    I thought that the better thing was to give a color for each column so that they can be quickly distinguishable and nice to see...

    Using less colors, maybe IPs and numbers yellow both, or yellow and green, dunno...
    if u want, u can apply the patch and put the colors u like, or remove them all too...
    User avatar
    terencehill
    Alien
     
    Posts: 176
    Joined: Thu Jul 10, 2008 10:33 pm
    Location: Italy

Sun Dec 14, 2008 8:07 am

  • I miss the layout of the 1st post of yours.
    Image[/img]
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Sun Dec 14, 2008 10:29 pm

  • terencehill wrote:I didn't touch the code to show the time.


    Sure, sorry for that, I've read the patch too quickly

    As i wrote, I've chosen this option: "Using parameters other than 0, 1 or 2, or using more parameters, it prints nothing.", since the previous behavior of status was to print nothing if any argument was given.


    My suggestion was at code level, but then I've patched dp and saw that your approach is very good. And I don't think that we need a new "status 3" in the short term, so maybe any other effort for improving this function is worthless.

    It works like a charm here :D Nice job !!!!
    User avatar
    mand1nga
    Alien trapper
     
    Posts: 321
    Joined: Mon May 12, 2008 12:19 am

Mon Dec 15, 2008 8:36 am

  • I have one other suggestion for "status 1": can you make it also show packet loss (code for reading that is in the "pings" command)?
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Wed Dec 17, 2008 1:31 am

Wed Dec 17, 2008 5:57 am

  • Yeah, thanks for fixing status 2.
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Wed Dec 17, 2008 7:02 am

  • I really like this new display, which is easy on the eyes. I'll apply that patch then.

    I did change it a bit though, since "status shjdlhjsdflhjdl" does print the regular status in previous DP svn.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Wed Dec 17, 2008 3:20 pm

  • Alien wrote:Yeah, thanks for fixing status 2.

    I didn't want to fix status 2 btw...
    I wanted that the name was near to the number and the IP, so they can be read quickly once u find the name u were seeking. This was the purpose. But now with alternate colors I've noticed that's almost the same thing, but nicer to see.

    divVerent wrote:I did change it a bit though, since "status shjdlhjsdflhjdl" does print the regular status in previous DP svn.

    OH man! I was convinced that the old cmd printed nothing with one or more given argument/s... My mistake, sry :)
    User avatar
    terencehill
    Alien
     
    Posts: 176
    Joined: Thu Jul 10, 2008 10:33 pm
    Location: Italy

Wed Dec 17, 2008 8:09 pm

  • Speaking of status, as "status 1" now is fully parsable output, I think I'll make rcon2irc request that status. That way, it can have the full player names and IPs (no idea what for yet, but it may prove useful).
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Thu Dec 18, 2008 7:23 am

  • Good job mate! :)
    "One should strive to achieve; not sit in bitter regret."
    WE ARE NEXUIZ.
    Image
    Image
    User avatar
    C.Brutail
    Laidback mapper
     
    Posts: 2357
    Joined: Tue Feb 28, 2006 7:26 pm
    Location: Ironforge

Thu Dec 18, 2008 8:07 am

  • Code: Select all
    <OpBaI> login ***********
    <haggerNexCTF> my wish is your command
    <OpBaI> status
    <haggerNexCTF> 84.58.11.28:26127      0  100  0:08:29 -666 #1   [R9M]div{}Verent [PB] {X} (dev)
    <haggerNexCTF> botclient              0    0  0:07:13    0 #2   [Dave]Dominion {X}
    <haggerNexCTF> botclient              0    0  0:01:58    0 #3   [Dave]Dominion {X}
    <OpBaI> kick # 2 AHAHAHAHAHAHAH))
    <haggerNexCTF> kicked 2 ([Dave]Dominion {X} @ botclient) (AHAHAHAHAHAHAH)))
    <OpBaI> bans
    <haggerNexCTF> 0 (194.187.59.90, 64.400002s), 1 (82.135.221, 64.400002s), 2 (82.135.221.82, 64.400002s)
    <OpBaI> kickban # 1 86400 3 IRC testing AHAHAHAHAH))
    <haggerNexCTF> kickbanned 1 ([R9M]div{}Verent [PB] {X} (dev) @ 84.58.11.28:26127), netmask 3, for 86400 seconds (IRC testing AHAHAHAHAH)))
    <OpBaI> bans
    <haggerNexCTF> 0 (194.187.59.90, 152.800003s), 1 (82.135.221, 32.800003s), 2 (82.135.221.82, 152.800003s), 3 (84.58.11, 86383.546875s)
    <OpBaI> unban 3
    <haggerNexCTF> removed ban #3 (84.58.11)
    <OpBaI> aaa
    <haggerNexCTF> unknown command (supported: status [substring], kick # id reason, kickban # id bantime mask reason, bans, unban banid)


    With the "status 1" format, this was very easy.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Thu Dec 18, 2008 10:50 am

  • OMG COOLEST!

    hm... was this done in pm-ing the bot on irc?
    "One should strive to achieve; not sit in bitter regret."
    WE ARE NEXUIZ.
    Image
    Image
    User avatar
    C.Brutail
    Laidback mapper
     
    Posts: 2357
    Joined: Tue Feb 28, 2006 7:26 pm
    Location: Ironforge

Thu Dec 18, 2008 11:31 am

  • yes
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Fri Jan 02, 2009 1:17 am

  • I'm finding a limit of 15 or 16 with "status 1" even when "status" or "status 2" show 22 players. Frags also returns 0 for CTF.

    Image

    Note: every 1 out of ~10 tries, I get 22 names from "status 1"
    User avatar
    [-z-]
    Site Admin and Nexuiz Ninja
     
    Posts: 1794
    Joined: Mon Nov 13, 2006 12:20 am
    Location: Florida

Thu Jan 08, 2009 12:20 am

  • The frags only showing 0/-666 is because the whole scorekeeping is now done in QC and setting the frags for the engine too would needlessly increase the bandwidth used by Nexuiz. If you want to see the frags use 'teamstatus'
    User avatar
    esteel
    Site admin and forum addon
     
    Posts: 3924
    Joined: Wed Mar 01, 2006 8:27 am

Thu Jan 08, 2009 6:13 am

  • [-z-]: Update your rcon2irc, this has been fixed in rcon2irc. You may want to increase the timeout for packet reading (rcon_timeout_inter=0.5 for example) if it still doesn't work reliably enough.

    As for frags showing 0 and -666, this can't REALLY be helped... not sure if status should always be showing cl->frags. I can make the code show the "qcstatus" column instead, but then the column width would depend on the mod.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Thu Jan 08, 2009 7:57 am

  • Then I think frags should be changed to playing or spectating depending on the value.
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am



Return to Nexuiz - Development




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest