REST endpoint /v2/users/activelist now null checks and works with 0 players.

Fixes #362
This commit is contained in:
Lucas Nicodemus 2012-02-09 21:43:35 -07:00
parent d72dc36580
commit ee20946cdd
3 changed files with 1464 additions and 1460 deletions

View file

@ -48,5 +48,5 @@ using System.Runtime.InteropServices;
// Build Number
// MMdd of the build
[assembly: AssemblyVersion("3.7.0.0204")]
[assembly: AssemblyFileVersion("3.7.0.0204")]
[assembly: AssemblyVersion("3.7.0.0209")]
[assembly: AssemblyFileVersion("3.7.0.0209")]

View file

@ -161,6 +161,10 @@ namespace TShockAPI
string playerlist = "";
foreach (var TSPlayer in TShock.Players)
{
if (TSPlayer == null)
{
continue;
}
playerlist += playerlist == "" ? TSPlayer.UserAccountName : "\t" + TSPlayer.UserAccountName;
}
var returnBlock = new Dictionary<string, string>();

File diff suppressed because it is too large Load diff