Debug
This commit is contained in:
parent
c5c0a7e506
commit
9791955414
1 changed files with 4 additions and 3 deletions
|
|
@ -303,6 +303,7 @@ namespace TShockAPI
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
args.Player.SendMessage("Invalid login attempt. This incident has been reported.", Color.Red);
|
args.Player.SendMessage("Invalid login attempt. This incident has been reported.", Color.Red);
|
||||||
|
args.Player.SendMessage("User found: " + exr[0] + ", Password Encrypt Found: " + exr[1]);
|
||||||
Log.Warn(args.Player.IP + " failed to authenticate as " + args.Parameters[0]);
|
Log.Warn(args.Player.IP + " failed to authenticate as " + args.Parameters[0]);
|
||||||
args.Player.LoginAttempts++;
|
args.Player.LoginAttempts++;
|
||||||
return;
|
return;
|
||||||
|
|
@ -327,7 +328,7 @@ namespace TShockAPI
|
||||||
TextWriter tw = new StreamWriter(FileTools.UsersPath, true);
|
TextWriter tw = new StreamWriter(FileTools.UsersPath, true);
|
||||||
tw.WriteLine("\n" + args.Parameters[1].Split(':')[0] + ":" + Tools.HashPassword(args.Parameters[1].Split(':')[0]) + " " + args.Parameters[2]);
|
tw.WriteLine("\n" + args.Parameters[1].Split(':')[0] + ":" + Tools.HashPassword(args.Parameters[1].Split(':')[0]) + " " + args.Parameters[2]);
|
||||||
tw.Close();
|
tw.Close();
|
||||||
//Notify the admin that they can now login
|
args.Player.SendMessage("This player can now login!", Color.Green);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (args.Parameters[1].Split(':').Length == 1)
|
else if (args.Parameters[1].Split(':').Length == 1)
|
||||||
|
|
@ -335,8 +336,8 @@ namespace TShockAPI
|
||||||
TextWriter tw = new StreamWriter(FileTools.UsersPath, true);
|
TextWriter tw = new StreamWriter(FileTools.UsersPath, true);
|
||||||
tw.WriteLine("\n" + args.Parameters[1] + " " + args.Parameters[2]);
|
tw.WriteLine("\n" + args.Parameters[1] + " " + args.Parameters[2]);
|
||||||
tw.Close();
|
tw.Close();
|
||||||
//Notify the admin that they can now login if they rejoin
|
args.Player.SendMessage("IP address admin added. If they're logged in, tell them to rejoin.", Color.Green);
|
||||||
//Notify admin that this is fucking insecure
|
args.Player.SendMessage("WARNING: This is insecure! It would be better to use a user account instead.", Color.Red);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue