mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
Changed the online player count alert message
This commit is contained in:
parent
e671abd640
commit
5d58f51e42
2 changed files with 12 additions and 8 deletions
|
|
@ -333,13 +333,15 @@ namespace ServerManagerTool.Lib
|
|||
break;
|
||||
}
|
||||
|
||||
if (this.Players != update.OnlinePlayerCount)
|
||||
{
|
||||
PluginHelper.Instance.ProcessAlert(AlertType.OnlinePlayerCountChanged, this.ProfileSnapshot.ProfileName, $"{Config.Default.Alert_OnlinePlayerCountChange} {update.OnlinePlayerCount}");
|
||||
}
|
||||
var previousOnlinePlayerCount = this.Players;
|
||||
this.Players = update.OnlinePlayerCount;
|
||||
this.MaxPlayers = update.ServerInfo?.MaxPlayers ?? this.ProfileSnapshot.MaxPlayerCount;
|
||||
|
||||
if (previousOnlinePlayerCount != this.Players)
|
||||
{
|
||||
PluginHelper.Instance.ProcessAlert(AlertType.OnlinePlayerCountChanged, this.ProfileSnapshot.ProfileName, $"{Config.Default.Alert_OnlinePlayerCountChange} {this.Players} / {this.MaxPlayers}");
|
||||
}
|
||||
|
||||
if (update.ServerInfo != null)
|
||||
{
|
||||
var match = Regex.Match(update.ServerInfo.Name, @"\(v([0-9]+\.[0-9]*)\)");
|
||||
|
|
|
|||
|
|
@ -332,13 +332,15 @@ namespace ServerManagerTool.Lib
|
|||
break;
|
||||
}
|
||||
|
||||
if (this.Players != update.OnlinePlayerCount)
|
||||
{
|
||||
PluginHelper.Instance.ProcessAlert(AlertType.OnlinePlayerCountChanged, this.ProfileSnapshot.ProfileName, $"{Config.Default.Alert_OnlinePlayerCountChange} {update.OnlinePlayerCount}");
|
||||
}
|
||||
var previousOnlinePlayerCount = this.Players;
|
||||
this.Players = update.OnlinePlayerCount;
|
||||
this.MaxPlayers = update.ServerInfo?.MaxPlayers ?? this.ProfileSnapshot.MaxPlayerCount;
|
||||
|
||||
if (previousOnlinePlayerCount != this.Players)
|
||||
{
|
||||
PluginHelper.Instance.ProcessAlert(AlertType.OnlinePlayerCountChanged, this.ProfileSnapshot.ProfileName, $"{Config.Default.Alert_OnlinePlayerCountChange} {this.Players} / {this.MaxPlayers}");
|
||||
}
|
||||
|
||||
var serverExeFile = Path.Combine(this.ProfileSnapshot.InstallDirectory, Config.Default.ServerBinaryRelativePath, Config.Default.ServerExeFile);
|
||||
if (!string.IsNullOrWhiteSpace(serverExeFile) && File.Exists(serverExeFile))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue