Closed matthewlenz closed 11 years ago
BattleNET client.exe -host 127.0.0.1 -port 2303 -password secret -command players > output.txt
?
Doh. I guess I was expecting output on stdout. Didn't realize you were detecting if there was file redirection. Very cool. Thanks and sorry for the issue. Is that documented? If so, I guess I overlooked it. If not, might be helpful. :)
It's just a basic feature from the console. The library itself doesn't have it.
Yeah I understand that. But normally when a command dumps via redirection it dumps to standard out when there is no redirection. Running the 'players' command without > outfile.txt yields no output.
Figured out the problem. It's not always returning results. Bug? Must be, I can use bercon and repeatedly request player lists and get a result.
Hmm not sure, it's unknown to me at least.
From my experiments the rcon server rejects connections when there are more than 4 or 5 clients (you get a message in the console about an admin logged in) logged in. Since it's UDP, the server only detects a client 'disconnect' when it doesn't receive messages for more than 45 seconds. When you execute BattleNet client.exe it connects to the server and creates a new session by logging in. So if you have for example gotcha and bec connected you might already have 2 active sessions, and only have 2 or 3 spare sessions that you can use before it rejects the connection... and if you executed the exe a couple times in the last 45 seconds it created sessions that are still alive in the server, so the pool is full and your connection will be rejected. I need to test all of this to find out the exact mechanism, but that's what I'm gathering so far from my tests.
I think I ran into the same issue today. It didn't seem entirely connected to the client limit. It just seemed to hang until it timed out. Not sure what causes it though.
i can confirm the same behaviour that st4l explain, if i have a lot of program using the admin interface this will hang up and can drop even the server. (happens on dayz)
Ok, well I guess this is an BattlEye issue instead of a BattleNET issue then.
Any possibility of dumping the output to a file? maybe command.txt in the working directory? pretty please? :) even stdout would be awesome.