/auth-verify now removes authcode.txt

Some strings have been shortened to comply with Terraria's inability to move text that is too long to the second line.
This commit is contained in:
Lucas Nicodemus 2011-07-13 03:03:02 -06:00
parent 77ed57a4bd
commit bab6d6cd2e
2 changed files with 6 additions and 4 deletions

View file

@ -1534,7 +1534,7 @@ namespace TShockAPI
args.Player.Group = Tools.GetGroup("superadmin"); args.Player.Group = Tools.GetGroup("superadmin");
args.Player.SendMessage("This IP address is now superadmin. Please perform the following command:"); args.Player.SendMessage("This IP address is now superadmin. Please perform the following command:");
args.Player.SendMessage("/user add <username>:<password> superadmin"); args.Player.SendMessage("/user add <username>:<password> superadmin");
args.Player.SendMessage("This will create the username <username> with the password <password> as part of the superadmin group."); args.Player.SendMessage("Creates: <username> with the password <password> as part of the superadmin group.");
args.Player.SendMessage("Please use /login <username> <password> to login from now on."); args.Player.SendMessage("Please use /login <username> <password> to login from now on.");
args.Player.SendMessage("If you understand, please /login <username> <password> now, and type /auth-verify"); args.Player.SendMessage("If you understand, please /login <username> <password> now, and type /auth-verify");
return; return;
@ -1545,7 +1545,7 @@ namespace TShockAPI
args.Player.SendMessage("Please disable the auth system! If you need help, consult the forums. http://tshock.co/"); args.Player.SendMessage("Please disable the auth system! If you need help, consult the forums. http://tshock.co/");
args.Player.SendMessage("This IP address is now superadmin. Please perform the following command:"); args.Player.SendMessage("This IP address is now superadmin. Please perform the following command:");
args.Player.SendMessage("/user add <username>:<password> superadmin"); args.Player.SendMessage("/user add <username>:<password> superadmin");
args.Player.SendMessage("This will create the username <username> with the password <password> as part of the superadmin group."); args.Player.SendMessage("Creates: <username> with the password <password> as part of the superadmin group.");
args.Player.SendMessage("Please use /login <username> <password> to login from now on."); args.Player.SendMessage("Please use /login <username> <password> to login from now on.");
args.Player.SendMessage("If you understand, please /login <username> <password> now, and type /auth-verify"); args.Player.SendMessage("If you understand, please /login <username> <password> now, and type /auth-verify");
return; return;
@ -1570,13 +1570,14 @@ namespace TShockAPI
args.Player.SendMessage("This is a security measure designed to prevent insecure administration setups."); args.Player.SendMessage("This is a security measure designed to prevent insecure administration setups.");
args.Player.SendMessage("Please re-run /auth and read the instructions!"); args.Player.SendMessage("Please re-run /auth and read the instructions!");
args.Player.SendMessage("If you're still confused, consult the forums. http://tshock.co/"); args.Player.SendMessage("If you're still confused, consult the forums. http://tshock.co/");
return;
} }
args.Player.SendMessage("Your new account has been verified, and the /auth system has been turned off."); args.Player.SendMessage("Your new account has been verified, and the /auth system has been turned off.");
args.Player.SendMessage("You can always use the /user command to manage players. Do not just delete the auth.lck file."); args.Player.SendMessage("You can always use the /user command to manage players. Don't just delete the auth.lck.");
args.Player.SendMessage("Thankyou for using TShock! http://tshock.co/ & http://github.com/TShock/TShock"); args.Player.SendMessage("Thankyou for using TShock! http://tshock.co/ & http://github.com/TShock/TShock");
FileTools.CreateFile(Path.Combine(TShock.SavePath, "auth.lck")); FileTools.CreateFile(Path.Combine(TShock.SavePath, "auth.lck"));
File.Delete(Path.Combine(TShock.SavePath + "authcode.txt")); File.Delete("./tshock/authcode.txt");
TShock.AuthToken = 0; TShock.AuthToken = 0;
} }

View file

@ -282,6 +282,7 @@ namespace TShockAPI
Console.WriteLine("TShock Notice: To become SuperAdmin, join the game and type /auth " + AuthToken); Console.WriteLine("TShock Notice: To become SuperAdmin, join the game and type /auth " + AuthToken);
Console.WriteLine("This token will display until disabled by verification. (/auth-verify)"); Console.WriteLine("This token will display until disabled by verification. (/auth-verify)");
Console.ForegroundColor = ConsoleColor.Gray; Console.ForegroundColor = ConsoleColor.Gray;
FileTools.CreateFile(Path.Combine(SavePath + "authcode.txt"));
TextWriter tw = new StreamWriter(Path.Combine(SavePath, "authcode.txt")); TextWriter tw = new StreamWriter(Path.Combine(SavePath, "authcode.txt"));
tw.WriteLine(AuthToken); tw.WriteLine(AuthToken);
tw.Close(); tw.Close();