Add /accountinfo, fix offline bans exploit, fix #1309 more
This commit is contained in:
parent
68799d9d20
commit
186bb70186
3 changed files with 57 additions and 4 deletions
|
|
@ -412,8 +412,8 @@ namespace TShockAPI
|
|||
KnownIps = JsonConvert.DeserializeObject<List<String>>(args.Player.User.KnownIps);
|
||||
}
|
||||
|
||||
bool found = KnownIps.Any(s => s.Equals(args.Player.IP));
|
||||
if (!found)
|
||||
bool last = KnownIps.Last() == args.Player.IP;
|
||||
if (!last)
|
||||
{
|
||||
if (KnownIps.Count == 100)
|
||||
{
|
||||
|
|
@ -1467,9 +1467,15 @@ namespace TShockAPI
|
|||
/// <param name="args">The CommandEventArgs object</param>
|
||||
private void ServerHooks_OnCommand(CommandEventArgs args)
|
||||
{
|
||||
if (args.Handled || string.IsNullOrWhiteSpace(args.Command))
|
||||
if (args.Handled)
|
||||
return;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(args.Command))
|
||||
{
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// Damn you ThreadStatic and Redigit
|
||||
if (Main.rand == null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue