NullSoldier / serverthrall

Conan Exiles Dedicated Server Manager
http://thrallbrowser.com
26 stars 8 forks source link

-NOSTEAM should be optional #79

Closed powermates closed 6 years ago

powermates commented 6 years ago

All parameters: -nosteam and -multibox should be optional. -NOSTEAM makes the server invisible in server list in game.

NullSoldier commented 6 years ago

I'll actually remove no-steam all together since it's purposed was to try to fix the error when the server opens and steam is running. I can put out a quick patch to fix these issues.

I think multihome being specified should be okay in all cases though. It only really helps people on a LAN network hosting from the machine that they're playing on.

powermates commented 6 years ago

In my dedicated server I only use the command line "ConanSandboxServer.exe -log".

The IP in the network card is in my case the final Internet IP, so I haven't tested with multibox option.

Maybe it's easier to implement in the config a "no parameters" option, or only passing the multibox parameter if the "multibox=" is present in the config.

powermates commented 6 years ago

And about avoiding -log to allow closing... As far as I know the proper method to close the engine is passing Control + C or ^C to the window, instead of closing the process. That way probably the database needs to rollback every start up because inconsistences or other unknown side-effects, The ^C method is also better way to inform the clients of disconnect, clearing memory garbage or other trivial tasks, etc...

Powershell code example as follows:

[Microsoft.VisualBasic.Interaction]::AppActivate("Conan Exiles - press Ctrl+C to shutdown")

[System.Windows.Forms.SendKeys]::SendWait("^" + "c")

Credits to https://steamcommunity.com/sharedfiles/filedetails/?id=860008401

NullSoldier commented 6 years ago

The problem is, Windows has no concept of SIG-INT which is what CTRL+C does in most operating systems or terminals. That's a custom GUI window that's accepting windows input.

I've tried many attempts to workaround sending CTRL+C. I'm interested in sending those key presses but it's going to take a LOT of work to be able to send those key presses to the GUI. I'll schedule this into v2.1.8.

powermates commented 6 years ago

Well, at least the powershell script is supposed to work, but it would be very dirty to exec it to close the game... maybe another plugin?? ;-)

ESRohner commented 6 years ago

https://github.com/NullSoldier/serverthrall/commit/32abb47854719e9afe893bd0ed8ddd840309c7da Removed -nosteam parameter entirely. If this was a misunderstanding just let me know!

NullSoldier commented 6 years ago

I'm moving the world to send CTRL +C to the terminal here https://github.com/NullSoldier/serverthrall/issues/85

The problem is we can't use powershell, as serverthrall is python and cross platform. I'll figure out some way to do it in python. I need to hook into the win32 windowing API which takes a lot more work.