PazerOP / tf2_bot_detector

Automatically detects and votekicks cheaters/bots in TF2 casual.
MIT License
400 stars 56 forks source link

Cannot read command line arguments if TF2 is running as admin #130

Closed id-rotatcepS closed 4 years ago

id-rotatcepS commented 4 years ago

Is this user error? I decided to try it for the first time at release .35 (x64) It launches TF2 with "Invalid TF2 command line arguments" in yellow at the top, and the bottom says Details: - Instance: Unable to find "-usercon" Unable to find "+ip" Unable to find "+rcon_password" Unable to find "+hostport"

None of that shows in the log file.

And there are no other controls except to Launch TF2 (and checkbox to autolaunch TF2)...and when TF2 is running bot detector doesn't seem to be doing anything.

I am hoping to change some of the settings before TF2 launches - I think I want to turn off everything but auto-kick known bots and auto-update the official bot list - but no controls means I can't change any settings. Maybe that's a separate issue?

PazerOP commented 4 years ago

Strange. Just to be clear, the space to the right of "Instance" is completely blank?

What version of Windows are you running? (In "About your PC") image

id-rotatcepS commented 4 years ago

Strange. Just to be clear, the space to the right of "Instance" is completely blank? image yep... I get the above a little while after clicking "Launch TF2"

What version of Windows are you running? (In "About your PC") image

PazerOP commented 4 years ago

I can already tell this is going to be a fun bug

id-rotatcepS commented 4 years ago

I can already tell this is going to be a fun bug

LOL. Then I'll try to volunteer some more information: In steam I have Launch Options set: -novid -sillygibs Although not using it for TF2, I do have a Valve Index and SteamVR and "Use Desktop Game Theatre while SteamVR is active" is checked (which must have been a default). Other steam properties are likely defaults.

Nothing else I can think of of SHOULD be relevant, feel free to ask about installs, etc, however. (for instance I use AHK and do software development, but nothing directly with TF2-related stuff)... I do have Half-life 1, 2, 2e1, & 2e2 currently installed, too. Oh and I guess steam/tf2 are launching in admin mode (I have to launch discord in that mode for it to work right with tf2).

PazerOP commented 4 years ago

Thanks, that info helped. It seems to be caused by TF2 running as administrator.

PazerOP commented 4 years ago

The above commit adds a check to make sure we are getting command line arguments properly. Now, you'd see this screen: image

id-rotatcepS commented 4 years ago

Thanks! It also fixes it to run tf2_bot_detector in administrator mode like I do with discord. But I'll look into whether I still need steam in that mode or not.

PazerOP commented 4 years ago

Glad that worked for you. It doesn't matter if Steam is running as admin or not, its easier to tell people to put everything back to default settings.