Merge pull request #442 from erikive/general-devel
Added separate permission for userinfo and reason for shutting down
This commit is contained in:
commit
550a43f1e4
2 changed files with 9 additions and 4 deletions
|
|
@ -193,7 +193,7 @@ namespace TShockAPI
|
|||
ChatCommands.Add(new Command(Permissions.canchangepassword, PasswordUser, "password") {DoLog = false});
|
||||
ChatCommands.Add(new Command(Permissions.canregister, RegisterUser, "register") {DoLog = false});
|
||||
ChatCommands.Add(new Command(Permissions.rootonly, ManageUsers, "user") {DoLog = false});
|
||||
add(Permissions.rootonly, GrabUserUserInfo, "userinfo", "ui");
|
||||
add(Permissions.userinfo, GrabUserUserInfo, "userinfo", "ui");
|
||||
add(Permissions.rootonly, AuthVerify, "auth-verify");
|
||||
ChatCommands.Add(new Command(Permissions.canlogin, AttemptLogin, "login") {DoLog = false});
|
||||
add(Permissions.cfg, Broadcast, "broadcast", "bc", "say");
|
||||
|
|
@ -1051,7 +1051,8 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
|
||||
TShock.Utils.StopServer();
|
||||
string reason = ((args.Parameters.Count > 0) ? "Server shutting down: " + String.Join(" ", args.Parameters) : "Server shutting down!");
|
||||
TShock.Utils.StopServer(true, reason);
|
||||
}
|
||||
//Added restart command
|
||||
private static void Restart(CommandArgs args)
|
||||
|
|
@ -1073,7 +1074,8 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
|
||||
TShock.Utils.StopServer();
|
||||
string reason = ((args.Parameters.Count > 0) ? "Server shutting down: " + String.Join(" ", args.Parameters) : "Server shutting down!");
|
||||
TShock.Utils.StopServer(true, reason);
|
||||
System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
|
@ -1081,7 +1083,8 @@ namespace TShockAPI
|
|||
|
||||
private static void OffNoSave(CommandArgs args)
|
||||
{
|
||||
TShock.Utils.StopServer(false);
|
||||
string reason = ((args.Parameters.Count > 0) ? "Server shutting down: " + String.Join(" ", args.Parameters) : "Server shutting down!");
|
||||
TShock.Utils.StopServer(false, reason);
|
||||
}
|
||||
|
||||
private static void CheckUpdates(CommandArgs args)
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ namespace TShockAPI
|
|||
{
|
||||
//Permissions with blank descriptions basically means its described by the commands it gives access to.
|
||||
|
||||
[Description("Allows player to get user info")] public static readonly string userinfo;
|
||||
|
||||
[Description("")] public static readonly string causeevents;
|
||||
|
||||
[Description("Required to be able to build (modify tiles and liquid)")] public static readonly string canbuild;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue