Finished the remaing bot commands

This commit is contained in:
Brett Hewitson 2021-12-05 15:08:37 +10:00
parent 0f3c6e6be9
commit aa62646f0f
23 changed files with 1041 additions and 287 deletions

View file

@ -167,13 +167,19 @@ namespace ServerManagerTool.Lib
ServerProfile.QueryPortProperty,
ServerProfile.ServerIPProperty,
ServerProfile.MaxPlayersProperty,
ServerProfile.ServerPasswordProperty,
ServerProfile.AdminPasswordProperty,
ServerProfile.ServerMapProperty,
ServerProfile.ServerMapSaveFileNameProperty,
ServerProfile.ServerModIdsProperty,
ServerProfile.MOTDIntervalProperty,
},
(s, p) =>
{
if (Status == ServerStatus.Stopped || Status == ServerStatus.Uninstalled || Status == ServerStatus.Unknown)
if (Status == ServerStatus.Stopped || Status == ServerStatus.Uninstalled || Status == ServerStatus.Unknown || Status == ServerStatus.Updating)
{
AttachToProfileCore(profile);
}
@ -194,16 +200,7 @@ namespace ServerManagerTool.Lib
return;
}
if (!String.IsNullOrWhiteSpace(this.ProfileSnapshot.ServerIP) && IPAddress.TryParse(this.ProfileSnapshot.ServerIP, out IPAddress localServerIpAddress))
{
// Use the explicit Server IP
localServerQueryEndPoint = new IPEndPoint(localServerIpAddress, Convert.ToUInt16(this.ProfileSnapshot.QueryPort));
}
else
{
// No Server IP specified, use Loopback
localServerQueryEndPoint = new IPEndPoint(IPAddress.Loopback, Convert.ToUInt16(this.ProfileSnapshot.QueryPort));
}
localServerQueryEndPoint = new IPEndPoint(this.ProfileSnapshot.ServerIPAddress, Convert.ToUInt16(this.ProfileSnapshot.QueryPort));
//
// Get the public endpoint for querying Steam
@ -1061,7 +1058,7 @@ namespace ServerManagerTool.Lib
try
{
var endPoint = new IPEndPoint(IPAddress.Parse(this.ProfileSnapshot.ServerIP), this.ProfileSnapshot.RconPort);
var endPoint = new IPEndPoint(this.ProfileSnapshot.ServerIPAddress, this.ProfileSnapshot.RconPort);
var server = QueryMaster.ServerQuery.GetServerInstance(QueryMaster.EngineType.Source, endPoint, sendTimeOut: 10000, receiveTimeOut: 10000);
if (server == null)