iw4x / iw4x-client

GNU General Public License v3.0
120 stars 40 forks source link

Additional connect/disconnect log lines for server owners and game panels #93

Open Bluscream opened 7 months ago

Bluscream commented 7 months ago

What problem will this solve? can we have a 2 new log lines on player connect/disconnect that gives all relevant info in 1 line for game panels. example taken from AMPs IW4x template:

Console.UserJoinRegex=^Registering xuid (?<userid>.+?) at slot \d+ in .*$
Console.UserLeaveRegex=^Removing xuid (?<userid>.+?) \(clientNum \d+\) from session$

What might be a solution? ideally something like

Connected;<slot>;<guid>;<ip>;"<name>"
Disconnected;<slot>;<guid>;<ip>;<reason>;"<name>"

I would suggest keeping the name as last part so even though that's something the user can control, it being the last part and in quotes makes it unlikely to interfere. Also if you want to be on the safe side you can always escape the \" and \;

What other alternatives have you already considered? before the smartbrains go and say "you can already do that with gsc". I am talking about something that's available for everyone that sets up a server via AMP or pterodactyl for example. It's bad enough even to expect everyone to be running iw4madmin, even though i consider that essential kit when you're hosting iw4x.

Additional info (if the new lines need to be later than the originals because some of the values are not known that early, thats fine by me) i don't really need to know every unsuccessful connection anyway

diamante0018 commented 7 months ago

Aren't these lines already in the game log? The J is for join And the Q is for disconnect (quit)

Bluscream commented 7 months ago

full connect sequence; and all the relevant infos are split up into multiple lines that sometimes are out of order; name is never printed. just give us one clear and consise line containing everything in a easy to read and easy to process format 🙏🏻

Client 0 connecting with 6700 challenge ping from xxx:61087
Not invited (invited is '0')
Going from CS_FREE to CS_CONNECTED for  (num 0 guid "xxxx")
Setting client 0 NATTYPE to 1
Registering xuid xxxat slot 0 in a public slot - they have nat type 3.  That will give us 0 private slots used and 1 public slots used
Changing clientNum 0's address from type 0, ip 0.0.0.0, port 0, to type 4, ip xxx, port 40942
Setting client 0 XNADDR to 
Setting client 0 XUID to xxx
Received packet 0 of stats data from clientNum 0
print
Received packet 1 of stats data from clientNum 0
Received packet 2 of stats data from clientNum 0
Received packet 3 of stats data from clientNum 0
Received packet 4 of stats data from clientNum 0
Received packet 5 of stats data from clientNum 0
Received packet 6 of stats data from clientNum 0
[Logger] ^4Blu^:scream (0/xxx/xxx.xxx.xxx.xxx:xxxxx) connected
[Logger] Clients: 0 / 18 (Players: 0 Bots: 0)
Raw -> 0: Es gibt 0 ^7neue Reports
Raw: ^9[*] Total players: ^545
Raw: ^5^5Besitzer ^7^4Blu^:scream ^7trat bei.
Raw -> 0: Willkommen ^5^4Blu^:scream^7, das ist dein ^5131. ^7mal hier!
Raw: ^5^4Blu^:scream ^7kommt aus ^5Deutschland
diamante0018 commented 7 months ago

That's the console log The game log is in another file You can see that information from the server.cfg

Bluscream commented 7 months ago

That's the console log The game log is in another file You can see that information from the server.cfg

well, it's the stdout, isn't it? so it's what most panels i know of read for infos

diamante0018 commented 7 months ago

You can read the console log and game log even on the dinosaur game panel They are files getting refreshed on each write Xerxes is doing that