Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. MW3 Server Hosting Support
  3. game stat

game stat

Scheduled Pinned Locked Moved MW3 Server Hosting Support
13 Posts 4 Posters 528 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined Offline
    undefined Offline
    chacha18
    wrote on Dec 2, 2020, 7:32 AM last edited by
    #1

    Hi guys,

    I'm gona try Plutonium (coming from Tecknogods) on MW3 first and hopefuly BO2.
    I'm wondering if as opposed to tckgds, plutonium is supporting gamestat protocol (or rather Gamespy3/4) ? Like used in Gametracker.

    I am building a multi-game hosting with cross-game players statistics, fully relying on quake2stat cmd wich is using gamespy protocol. Is it compatible with your dedicated server ? It appear to be not the case with tckgds ..

    If not, I plan to build a rcon/gamespy wrapper daemon but before I need to know :).

    Thx

    1 Reply Last reply
    0
    • undefined Offline
      undefined Offline
      Xerxes Plutonium Staff
      wrote on Dec 2, 2020, 11:47 AM last edited by
      #2

      You can use the Q3 Protocol to query both IW5 and T6 Servers.

      undefined 1 Reply Last reply Dec 2, 2020, 8:54 PM
      0
      • undefined Offline
        undefined Offline
        chacha18
        replied to Xerxes on Dec 2, 2020, 8:54 PM last edited by chacha18 Dec 2, 2020, 10:55 PM
        #3

        Xerxes said in game stat:

        Q3 Protocol

        Super new !
        And do you confirm its an evolution regardin tecknogods server ? or is it enabled by default in all MW server (genuine or not) ?

        undefined 1 Reply Last reply Dec 3, 2020, 9:24 AM
        0
        • undefined Offline
          undefined Offline
          Chase
          wrote on Dec 2, 2020, 10:56 PM last edited by
          #4

          I know this doesn't exactly answer your question, but IW4MAdmin does a fantastic job at managing servers with a full web front you can try out.

          1 Reply Last reply
          0
          • undefined Offline
            undefined Offline
            Xerxes Plutonium Staff
            replied to chacha18 on Dec 3, 2020, 9:24 AM last edited by
            #5

            chacha18 On all, some are however encrypted with DTLS.

            1 Reply Last reply
            0
            • undefined Offline
              undefined Offline
              chacha18
              wrote on Dec 6, 2020, 12:32 PM last edited by
              #6

              Its working very good now with plutonium, perfect !
              I think the tecknogods version is either broken / disabled / encrypted because despite the dedicated server starts I was never able to read stats with quake2stat...

              Thanks for IW4MAdmin, I'll have a look 😉

              1 Reply Last reply
              0
              • undefined Offline
                undefined Offline
                chacha18
                wrote on Dec 6, 2020, 2:04 PM last edited by
                #7

                update:

                Actually, server stat are Ok for current game map, number of players, server name.. but not for player list / score.

                Should I do something to get it to work ?
                Or is it normal behavior ?

                Player name / score measurement is a must-have for my project 😕

                1 Reply Last reply
                0
                • undefined Offline
                  undefined Offline
                  chacha18
                  wrote on Dec 6, 2020, 3:04 PM last edited by
                  #8

                  #update2:

                  interesting thing, in the server browser the function "Get Server Info" lead to a timeout in every server. Not sure it is for the same reason but maybe ! Ill try wireshark-ing... Maybe someone from IW4MAdmin dev team have some info about this ?

                  1 Reply Last reply
                  0
                  • undefined Offline
                    undefined Offline
                    chacha18
                    wrote on Dec 7, 2020, 12:17 PM last edited by chacha18 Dec 7, 2020, 3:15 PM
                    #9

                    Ok, so I ended with developing a python script to trigger a RCON command and get the data.

                    For those who needs (not tested a lot yet to be honest !):

                    import socket
                    import re
                    
                    Rconpassword =  "YOUR_SERVER_RCON_PASSWORD"
                    ServerIp     =  "YOUR_SERVER_IP"
                    ServerPort   =  YOUR_SERVER_PORT
                    
                    
                    def Rcon_GetPlayersInfo(Ip,Port,Pass): 
                        MsgBuffSize      = 1500
                        PlayerStartRegex = r"-----\n"
                        PlayerLineRegex   = r"[\s]*(?P<num>-?\d+)[\s]+(?P<score>-?\d+)[\s]+(?P<bot>-?\d+)[\s]+(?P<ping>-?\d+)[\s]+(?P<guid>[0-9a-fA-F]+)[\s]+(?P<name>[^\s\\]+)[\s]+(?P<last_msg>\d+)[\s]+(?P<ip>[0-9.:]+)[\s]+(?P<qport>-?\d+)[\s]+(?P<rate>\d+)\n"
                      
                        msgClient = b'\xff\xff\xff\xffrcon ' + Pass.encode() + b' status\x00\xe6\xea'
                        msgToSend = msgClient
                        addrPort = (Ip, Port)
                        bufferSize = MsgBuffSize
                    
                        s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
                        s.settimeout(0.1)
                        
                        bFetchOK = False
                        nTry = 0
                        while (not bFetchOK and nTry < 10):
                            try:
                                s.sendto(msgToSend, addrPort)
                                data = bytearray(s.recvfrom(bufferSize)[0])
                                bFetchOK = True
                            except socket.timeout:
                                nTry+=1
                                continue
                                    
                        if not bFetchOK:
                            return []
                            
                        Newdata = bytearray()
                        for _byte in data:
                            if _byte == 0xff:
                                continue
                            else:
                                Newdata.append(_byte)
                                
                            
                    
                        msg = Newdata.decode('ascii')
                    
                        pattern = re.compile(PlayerStartRegex)
                        matchStart = pattern.search(msg)
                        if matchStart is None:
                            print('no match found, leaving')
                            exit(0)
                    
                        pattern = re.compile(PlayerLineRegex)
                    
                        offset = matchStart.end()
                        ar_players = []
                        while True:
                            MatchPlayer = pattern.search(msg,offset)
                            if MatchPlayer is not None:
                                ar_players.append(MatchPlayer.groupdict())
                                offset = MatchPlayer.end()  
                            else :
                                break;
                    
                        return ar_players
                    
                    ar_players=Rcon_GetPlayersInfo(ServerIp,ServerPort,Rconpassword)
                    
                    for player in ar_players:
                        print ("=== Player " + player['name'])
                        print (player['score'])
                        print (player['bot'])
                        print (player['ping'])
                        print (player['guid'])
                        print (player['name'])
                        print (player['last_msg'])
                        print (player['ip'])
                        print (player['qport'])
                        print (player['rate'])
                    
                    
                    
                    1 Reply Last reply
                    0
                    • FragsAreUsundefined Offline
                      FragsAreUsundefined Offline
                      FragsAreUs Plutonium Staff
                      wrote on Dec 7, 2020, 3:26 PM last edited by
                      #10

                      that you would have to talk to either raidmax about who made iw4madmin or maybe rekt over the server info timing out but if they python script works for you then congrats on helping out with something in the community it is always good to see new stuff coming to mw3

                      undefined 1 Reply Last reply Dec 7, 2020, 8:26 PM
                      0
                      • undefined Offline
                        undefined Offline
                        chacha18
                        replied to FragsAreUs on Dec 7, 2020, 8:26 PM last edited by
                        #11

                        FragsAreUs
                        Thank you !
                        For the moment - actually, for the last 8 hours - my script seems to work really well !

                        Not sure if the retry trick I had to add is because the server do not respond or if it respond too fast but anyway... I have so many other thinks to do on the project and Im a bit tired of wireshark for today 🙂
                        I have 2 MW3 server and soon 2 BO2 that I pool every 10 sec, its enough for this job 🙂

                        I will update this post in the future if I make new fixes / features 😉

                        1 Reply Last reply
                        0
                        • undefined Offline
                          undefined Offline
                          chacha18
                          wrote on Dec 7, 2020, 10:38 PM last edited by
                          #12

                          Bad news....

                          Player list is working very well, but scores always stay at 0 😕

                          undefined 1 Reply Last reply Dec 7, 2020, 11:51 PM
                          0
                          • undefined Offline
                            undefined Offline
                            chacha18
                            replied to chacha18 on Dec 7, 2020, 11:51 PM last edited by chacha18 Dec 8, 2020, 1:52 AM
                            #13

                            I talked with RedMax from IW4MAdmin and it seems he also have the same issue.
                            You may have something broken.

                            Facts:

                            • QuakeStat can not get the player list (Q3 protocol)
                            • RCON status command is always displaying 0 for player score
                            1 Reply Last reply
                            0

                            1/13

                            Dec 2, 2020, 7:32 AM

                            • Login

                            • Don't have an account? Register

                            • Login or register to search.
                            1 / 1
                            • First post
                              1/13
                              Last post
                            0
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Donate