commit
5b3ff0ed8b
70 changed files with 317 additions and 1270 deletions
|
|
@ -1,90 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>TerrariaServer</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:TShock.Hooks.IHooks">
|
||||
<summary>
|
||||
Hooks interface
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TShock.IGame.Players">
|
||||
<summary>
|
||||
List of players
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TShock.HandlerList">
|
||||
<summary>
|
||||
See generic HandlerList
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:TShock.HandlerList`1">
|
||||
<summary>
|
||||
Works like an event. Allows for registering delegates with a higher or lower priority.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
</member>
|
||||
<member name="M:TShock.HandlerList`1.Register(System.EventHandler{`0},TShock.HandlerPriority,System.Boolean)">
|
||||
<summary>
|
||||
Register a handler
|
||||
</summary>
|
||||
<param name="handler">Delegate to be called</param>
|
||||
<param name="priority">Priority of the delegate</param>
|
||||
<param name="gethandled">Should the handler receive a call even if it has been handled</param>
|
||||
</member>
|
||||
<member name="M:TShock.IPlayer.Damage(System.Int32)">
|
||||
<summary>
|
||||
Attempts to damage the player.
|
||||
</summary>
|
||||
<param name="amt">int - how much damage to give</param>
|
||||
</member>
|
||||
<member name="M:TShock.IPlayer.SendMessage(System.String,Color)">
|
||||
<summary>
|
||||
Sends message to specified player
|
||||
</summary>
|
||||
<param name="msg">string - text to send</param>
|
||||
<param name="color">Color - color for the text</param>
|
||||
</member>
|
||||
<member name="P:TShock.IPlayer.Id">
|
||||
<summary>
|
||||
Meant to only be used by TServer.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TShock.IPlayer.Name">
|
||||
<summary>
|
||||
The character name of the player.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:TShock.Plugin.CreateInterfaces">
|
||||
<summary>
|
||||
Return a list of interfaces this plugin exposes.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:TShock.Plugin.SetInterfaces(System.Collections.Generic.IEnumerable{System.Object})">
|
||||
<summary>
|
||||
Called before initialize passing all the interfaces gathered from plugins
|
||||
</summary>
|
||||
<param name="interfaces"></param>
|
||||
</member>
|
||||
<member name="M:TShock.Plugin.GetInterface``1(System.Collections.Generic.IEnumerable{System.Object})">
|
||||
<summary>
|
||||
Gets the T interface from the collection. Returns null if its not found.
|
||||
</summary>
|
||||
<typeparam name="T"></typeparam>
|
||||
<param name="interfaces"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="P:TShock.Hooks.Player.PlayerHooks.Join">
|
||||
<summary>
|
||||
Called when the player first connects. They are not fully in the game yet, for that see Greet.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:TShock.Hooks.Player.PlayerHooks.Greet">
|
||||
<summary>
|
||||
Called when the player is actually loaded into the game.
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
36
CONTRIBUTING
36
CONTRIBUTING
|
|
@ -1,36 +0,0 @@
|
|||
### Issue Guidelines
|
||||
Please follow these simple requirements before posting an issue:
|
||||
|
||||
1. TShock version number
|
||||
2. Any stack traces that may have happened when the issue occurred
|
||||
3. How to reproduce the issue
|
||||
|
||||
### Pull Request Dev Guidelines
|
||||
|
||||
These guidelines are for contributors. If you do not follow these guidelines your commits will be reverted.
|
||||
|
||||
Required:
|
||||
- Follow the code style. We generally use microsofts except for m_ infront of private variables.
|
||||
- Do not push unfinished features to the master branch, instead create a remote branch and push to that.
|
||||
- Do not push untested code to the master branch, instead push to the test branch.
|
||||
- Document all compatibility issues in the COMPATIBILITY file. (IE file formats changing)
|
||||
- DO NOT MASS COMMIT. Commit changes as you go (without pushing). That way when you push we don't get a thousand changes with a 1-3 line commit message.
|
||||
|
||||
Optional:
|
||||
- Build Version Increment (http://autobuildversion.codeplex.com/).
|
||||
|
||||
----
|
||||
|
||||
### Dev Team Guidelines
|
||||
|
||||
These guidelines are to be followed by all developers with commit level access to this repository:
|
||||
|
||||
- Do not, for any reason, submit code to the master branch before it hits the development branch first. If the development branch is far ahead, and a new bug fix is going out, branch master, then merge with master and remove your branch.
|
||||
- If you are found to do this, you will be the person merging and rebasing your code to fit general-devel.
|
||||
- Prior to posting any version on the website, you must tick the version in AssemblyInfo.cs. This is the versioning formula:
|
||||
- Major.Minor.Revision.BuildDate (tick Revision if you're fixing prior to an actual planned release)
|
||||
- Do not release any development builds on the forums without consulting another developer first.
|
||||
- __Document code prior to marking it done in JIRA__
|
||||
- Move any un-tested code to the "Needs Validation" section on JIRA prior to marking it as done.
|
||||
- Do not push changes to any branch without a proper issue being assigned in JIRA. If a feature isn't planned for this release, __it shouldn't be in the repo about to be released__.
|
||||
- Submit all pull requests to the general-devel branch prior to the master branch, or you will be ignored.
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -878,7 +878,6 @@ namespace TShockAPI
|
|||
args.Player.SendSuccessMessage("Account \"{0}\" has been registered.", user.Name);
|
||||
args.Player.SendSuccessMessage("Your password is {0}.", user.Password);
|
||||
TShock.Users.AddUser(user);
|
||||
TShock.CharacterDB.SeedInitialData(TShock.Users.GetUser(user));
|
||||
Log.ConsoleInfo("{0} registered an account: \"{1}\".", args.Player.Name, user.Name);
|
||||
}
|
||||
else
|
||||
|
|
@ -910,28 +909,35 @@ namespace TShockAPI
|
|||
{
|
||||
var user = new User();
|
||||
|
||||
try
|
||||
if (args.Parameters.Count == 4)
|
||||
{
|
||||
if (args.Parameters.Count == 4)
|
||||
user.Name = args.Parameters[1];
|
||||
user.Password = args.Parameters[2];
|
||||
user.Group = args.Parameters[3];
|
||||
|
||||
try
|
||||
{
|
||||
user.Name = args.Parameters[1];
|
||||
user.Password = args.Parameters[2];
|
||||
user.Group = args.Parameters[3];
|
||||
|
||||
args.Player.SendSuccessMessage("Account " + user.Name + " has been added to group " + user.Group + "!");
|
||||
TShock.Users.AddUser(user);
|
||||
TShock.CharacterDB.SeedInitialData(TShock.Users.GetUser(user));
|
||||
args.Player.SendSuccessMessage("Account " + user.Name + " has been added to group " + user.Group + "!");
|
||||
Log.ConsoleInfo(args.Player.Name + " added Account " + user.Name + " to group " + user.Group);
|
||||
}
|
||||
else
|
||||
catch (GroupNotExistsException e)
|
||||
{
|
||||
args.Player.SendErrorMessage("Invalid syntax. Try /user help.");
|
||||
args.Player.SendErrorMessage("Group " + user.Group + " does not exist!");
|
||||
}
|
||||
catch (UserExistsException e)
|
||||
{
|
||||
args.Player.SendErrorMessage("User " + user.Name + " already exists!");
|
||||
}
|
||||
catch (UserManagerException e)
|
||||
{
|
||||
args.Player.SendErrorMessage("User " + user.Name + " could not be added, check console for details.");
|
||||
Log.ConsoleError(e.ToString());
|
||||
}
|
||||
}
|
||||
catch (UserManagerException ex)
|
||||
else
|
||||
{
|
||||
args.Player.SendErrorMessage(ex.Message);
|
||||
Log.ConsoleError(ex.ToString());
|
||||
args.Player.SendErrorMessage("Invalid syntax. Try /user help.");
|
||||
}
|
||||
}
|
||||
// User deletion requires a username
|
||||
|
|
@ -946,60 +952,77 @@ namespace TShockAPI
|
|||
args.Player.SendSuccessMessage("Account removed successfully.");
|
||||
Log.ConsoleInfo(args.Player.Name + " successfully deleted account: " + args.Parameters[1] + ".");
|
||||
}
|
||||
catch (UserNotExistException e)
|
||||
{
|
||||
args.Player.SendErrorMessage("The user " + user.Name + " does not exist! Deleted nobody!");
|
||||
}
|
||||
catch (UserManagerException ex)
|
||||
{
|
||||
args.Player.SendMessage(ex.Message, Color.Red);
|
||||
Log.ConsoleError(ex.ToString());
|
||||
}
|
||||
}
|
||||
// Password changing requires a username, and a new password to set
|
||||
|
||||
// Password changing requires a username, and a new password to set
|
||||
else if (subcmd == "password")
|
||||
{
|
||||
var user = new User();
|
||||
user.Name = args.Parameters[1];
|
||||
|
||||
try
|
||||
if (args.Parameters.Count == 3)
|
||||
{
|
||||
if (args.Parameters.Count == 3)
|
||||
try
|
||||
{
|
||||
args.Player.SendSuccessMessage("Password change succeeded for " + user.Name + ".");
|
||||
TShock.Users.SetUserPassword(user, args.Parameters[2]);
|
||||
Log.ConsoleInfo(args.Player.Name + " changed the password of account " + user.Name);
|
||||
args.Player.SendSuccessMessage("Password change succeeded for " + user.Name + ".");
|
||||
}
|
||||
else
|
||||
catch (UserNotExistException e)
|
||||
{
|
||||
args.Player.SendErrorMessage("Invalid user password syntax. Try /user help.");
|
||||
args.Player.SendErrorMessage("User " + user.Name + " does not exist!");
|
||||
}
|
||||
catch (UserManagerException e)
|
||||
{
|
||||
args.Player.SendErrorMessage("Password change for " + user.Name + " failed! Check console!");
|
||||
Log.ConsoleError(e.ToString());
|
||||
}
|
||||
}
|
||||
catch (UserManagerException ex)
|
||||
else
|
||||
{
|
||||
args.Player.SendErrorMessage(ex.Message);
|
||||
Log.ConsoleError(ex.ToString());
|
||||
args.Player.SendErrorMessage("Invalid user password syntax. Try /user help.");
|
||||
}
|
||||
}
|
||||
// Group changing requires a username or IP address, and a new group to set
|
||||
// Group changing requires a username or IP address, and a new group to set
|
||||
else if (subcmd == "group")
|
||||
{
|
||||
var user = new User();
|
||||
user.Name = args.Parameters[1];
|
||||
var user = new User();
|
||||
user.Name = args.Parameters[1];
|
||||
|
||||
try
|
||||
if (args.Parameters.Count == 3)
|
||||
{
|
||||
if (args.Parameters.Count == 3)
|
||||
try
|
||||
{
|
||||
args.Player.SendSuccessMessage("Account " + user.Name + " has been changed to group " + args.Parameters[2] + "!");
|
||||
TShock.Users.SetUserGroup(user, args.Parameters[2]);
|
||||
Log.ConsoleInfo(args.Player.Name + " changed account " + user.Name + " to group " + args.Parameters[2] + ".");
|
||||
args.Player.SendSuccessMessage("Account " + user.Name + " has been changed to group " + args.Parameters[2] + "!");
|
||||
}
|
||||
else
|
||||
catch (GroupNotExistsException e)
|
||||
{
|
||||
args.Player.SendErrorMessage("Invalid user group syntax. Try /user help.");
|
||||
args.Player.SendErrorMessage("That group does not exist!");
|
||||
}
|
||||
catch (UserNotExistException e)
|
||||
{
|
||||
args.Player.SendErrorMessage("User " + user.Name + " does not exist!");
|
||||
}
|
||||
catch (UserManagerException e)
|
||||
{
|
||||
args.Player.SendErrorMessage("User " + user.Name + " could not be added. Check console for details.");
|
||||
}
|
||||
|
||||
}
|
||||
catch (UserManagerException ex)
|
||||
else
|
||||
{
|
||||
args.Player.SendMessage(ex.Message, Color.Green);
|
||||
Log.ConsoleError(ex.ToString());
|
||||
args.Player.SendErrorMessage("Invalid user group syntax. Try /user help.");
|
||||
}
|
||||
}
|
||||
else if (subcmd == "help")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
4
TShockAPI/DB/BanManager.cs
Normal file → Executable file
4
TShockAPI/DB/BanManager.cs
Normal file → Executable file
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -46,7 +46,7 @@ namespace TShockAPI.DB
|
|||
: new MysqlQueryCreator());
|
||||
try
|
||||
{
|
||||
creator.EnsureExists(table);
|
||||
creator.EnsureTableStructure(table);
|
||||
}
|
||||
catch (DllNotFoundException)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -57,7 +57,7 @@ namespace TShockAPI.DB
|
|||
db.GetSqlType() == SqlType.Sqlite
|
||||
? (IQueryBuilder) new SqliteQueryCreator()
|
||||
: new MysqlQueryCreator());
|
||||
creator.EnsureExists(table);
|
||||
creator.EnsureTableStructure(table);
|
||||
}
|
||||
|
||||
public PlayerData GetPlayerData(TSPlayer player, int acctid)
|
||||
|
|
@ -104,7 +104,7 @@ namespace TShockAPI.DB
|
|||
public bool SeedInitialData(User user)
|
||||
{
|
||||
var inventory = new StringBuilder();
|
||||
for (int i = 0; i < Terraria.Main.maxInventory; i++)
|
||||
for (int i = 0; i < NetItem.maxNetInventory; i++)
|
||||
{
|
||||
if (i > 0)
|
||||
{
|
||||
|
|
|
|||
51
TShockAPI/DB/GroupManager.cs
Normal file → Executable file
51
TShockAPI/DB/GroupManager.cs
Normal file → Executable file
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -47,34 +47,35 @@ namespace TShockAPI.DB
|
|||
db.GetSqlType() == SqlType.Sqlite
|
||||
? (IQueryBuilder) new SqliteQueryCreator()
|
||||
: new MysqlQueryCreator());
|
||||
creator.EnsureExists(table);
|
||||
if (creator.EnsureTableStructure(table))
|
||||
{
|
||||
// Add default groups if they don't exist
|
||||
AddDefaultGroup("guest", "",
|
||||
string.Join(",", Permissions.canbuild, Permissions.canregister, Permissions.canlogin, Permissions.canpartychat,
|
||||
Permissions.cantalkinthird, Permissions.canchat));
|
||||
|
||||
AddDefaultGroup("default", "guest",
|
||||
string.Join(",", Permissions.warp, Permissions.canchangepassword));
|
||||
|
||||
AddDefaultGroup("newadmin", "default",
|
||||
string.Join(",", Permissions.kick, Permissions.editspawn, Permissions.reservedslot));
|
||||
|
||||
AddDefaultGroup("admin", "newadmin",
|
||||
string.Join(",", Permissions.ban, Permissions.whitelist, "tshock.world.time.*", Permissions.spawnboss,
|
||||
Permissions.spawnmob, Permissions.managewarp, Permissions.time, Permissions.tp, Permissions.slap,
|
||||
Permissions.kill, Permissions.logs,
|
||||
Permissions.immunetokick, Permissions.tpothers));
|
||||
|
||||
AddDefaultGroup("trustedadmin", "admin",
|
||||
string.Join(",", Permissions.maintenance, "tshock.cfg.*", "tshock.world.*", Permissions.butcher, Permissions.item,
|
||||
Permissions.heal, Permissions.immunetoban, Permissions.usebanneditem));
|
||||
|
||||
AddDefaultGroup("vip", "default", string.Join(",", Permissions.reservedslot));
|
||||
}
|
||||
|
||||
// Load Permissions from the DB
|
||||
LoadPermisions();
|
||||
|
||||
// Add default groups if they don't exist
|
||||
AddDefaultGroup("guest", "",
|
||||
string.Join(",", Permissions.canbuild, Permissions.canregister, Permissions.canlogin, Permissions.canpartychat,
|
||||
Permissions.cantalkinthird, Permissions.canchat));
|
||||
|
||||
AddDefaultGroup("default", "guest",
|
||||
string.Join(",", Permissions.warp, Permissions.canchangepassword));
|
||||
|
||||
AddDefaultGroup("newadmin", "default",
|
||||
string.Join(",", Permissions.kick, Permissions.editspawn, Permissions.reservedslot));
|
||||
|
||||
AddDefaultGroup("admin", "newadmin",
|
||||
string.Join(",", Permissions.ban, Permissions.whitelist, "tshock.world.time.*", Permissions.spawnboss,
|
||||
Permissions.spawnmob, Permissions.managewarp, Permissions.time, Permissions.tp, Permissions.slap,
|
||||
Permissions.kill, Permissions.logs,
|
||||
Permissions.immunetokick, Permissions.tpothers));
|
||||
|
||||
AddDefaultGroup("trustedadmin", "admin",
|
||||
string.Join(",", Permissions.maintenance, "tshock.cfg.*", "tshock.world.*", Permissions.butcher, Permissions.item,
|
||||
Permissions.heal, Permissions.immunetoban, Permissions.usebanneditem));
|
||||
|
||||
AddDefaultGroup("vip", "default", string.Join(",", Permissions.reservedslot));
|
||||
|
||||
Group.DefaultGroup = GetGroupByName(TShock.Config.DefaultGuestGroupName);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
4
TShockAPI/DB/ItemManager.cs
Normal file → Executable file
4
TShockAPI/DB/ItemManager.cs
Normal file → Executable file
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -41,7 +41,7 @@ namespace TShockAPI.DB
|
|||
db.GetSqlType() == SqlType.Sqlite
|
||||
? (IQueryBuilder) new SqliteQueryCreator()
|
||||
: new MysqlQueryCreator());
|
||||
creator.EnsureExists(table);
|
||||
creator.EnsureTableStructure(table);
|
||||
UpdateItemBans();
|
||||
}
|
||||
|
||||
|
|
|
|||
4
TShockAPI/DB/ProjectileManager.cs
Normal file → Executable file
4
TShockAPI/DB/ProjectileManager.cs
Normal file → Executable file
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -41,7 +41,7 @@ namespace TShockAPI.DB
|
|||
db.GetSqlType() == SqlType.Sqlite
|
||||
? (IQueryBuilder) new SqliteQueryCreator()
|
||||
: new MysqlQueryCreator());
|
||||
creator.EnsureExists(table);
|
||||
creator.EnsureTableStructure(table);
|
||||
UpdateBans();
|
||||
}
|
||||
|
||||
|
|
|
|||
4
TShockAPI/DB/RegionManager.cs
Normal file → Executable file
4
TShockAPI/DB/RegionManager.cs
Normal file → Executable file
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -55,7 +55,7 @@ namespace TShockAPI.DB
|
|||
db.GetSqlType() == SqlType.Sqlite
|
||||
? (IQueryBuilder) new SqliteQueryCreator()
|
||||
: new MysqlQueryCreator());
|
||||
creator.EnsureExists(table);
|
||||
creator.EnsureTableStructure(table);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
4
TShockAPI/DB/RememberedPosManager.cs
Normal file → Executable file
4
TShockAPI/DB/RememberedPosManager.cs
Normal file → Executable file
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -42,7 +42,7 @@ namespace TShockAPI.DB
|
|||
db.GetSqlType() == SqlType.Sqlite
|
||||
? (IQueryBuilder) new SqliteQueryCreator()
|
||||
: new MysqlQueryCreator());
|
||||
creator.EnsureExists(table);
|
||||
creator.EnsureTableStructure(table);
|
||||
}
|
||||
|
||||
public Vector2 CheckLeavePos(string name)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
17
TShockAPI/DB/SqlTable.cs
Normal file → Executable file
17
TShockAPI/DB/SqlTable.cs
Normal file → Executable file
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -52,7 +52,8 @@ namespace TShockAPI.DB
|
|||
creator = provider;
|
||||
}
|
||||
|
||||
public void EnsureExists(SqlTable table)
|
||||
// Returns true if the table was created; false if it was not.
|
||||
public bool EnsureTableStructure(SqlTable table)
|
||||
{
|
||||
var columns = GetColumns(table);
|
||||
if (columns.Count > 0)
|
||||
|
|
@ -66,7 +67,19 @@ namespace TShockAPI.DB
|
|||
else
|
||||
{
|
||||
database.Query(creator.CreateTable(table));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ensures a table exists and that its structure is correct
|
||||
/// </summary>
|
||||
/// <param name="table">The table name</param>
|
||||
[Obsolete("This method will be replaced by EnsureTableExists.")]
|
||||
public void EnsureExists(SqlTable table)
|
||||
{
|
||||
EnsureTableStructure(table);
|
||||
}
|
||||
|
||||
public List<string> GetColumns(SqlTable table)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
4
TShockAPI/DB/TileManager.cs
Normal file → Executable file
4
TShockAPI/DB/TileManager.cs
Normal file → Executable file
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -41,7 +41,7 @@ namespace TShockAPI.DB
|
|||
db.GetSqlType() == SqlType.Sqlite
|
||||
? (IQueryBuilder)new SqliteQueryCreator()
|
||||
: new MysqlQueryCreator());
|
||||
creator.EnsureExists(table);
|
||||
creator.EnsureTableStructure(table);
|
||||
UpdateBans();
|
||||
}
|
||||
|
||||
|
|
|
|||
9
TShockAPI/DB/UserManager.cs
Normal file → Executable file
9
TShockAPI/DB/UserManager.cs
Normal file → Executable file
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -48,7 +48,7 @@ namespace TShockAPI.DB
|
|||
db.GetSqlType() == SqlType.Sqlite
|
||||
? (IQueryBuilder) new SqliteQueryCreator()
|
||||
: new MysqlQueryCreator());
|
||||
creator.EnsureExists(table);
|
||||
creator.EnsureTableStructure(table);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -76,6 +76,8 @@ namespace TShockAPI.DB
|
|||
|
||||
if (1 > ret)
|
||||
throw new UserExistsException(user.Name);
|
||||
|
||||
Hooks.AccountHooks.OnAccountCreate(user);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -86,10 +88,13 @@ namespace TShockAPI.DB
|
|||
{
|
||||
try
|
||||
{
|
||||
var tempuser = GetUser(user);
|
||||
int affected = database.Query("DELETE FROM Users WHERE Username=@0", user.Name);
|
||||
|
||||
if (affected < 1)
|
||||
throw new UserNotExistException(user.Name);
|
||||
|
||||
Hooks.AccountHooks.OnAccountDelete(tempuser);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
4
TShockAPI/DB/WarpsManager.cs
Normal file → Executable file
4
TShockAPI/DB/WarpsManager.cs
Normal file → Executable file
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -51,7 +51,7 @@ namespace TShockAPI.DB
|
|||
db.GetSqlType() == SqlType.Sqlite
|
||||
? (IQueryBuilder) new SqliteQueryCreator()
|
||||
: new MysqlQueryCreator());
|
||||
creator.EnsureExists(table);
|
||||
creator.EnsureTableStructure(table);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
66
TShockAPI/Hooks/AccountHooks.cs
Executable file
66
TShockAPI/Hooks/AccountHooks.cs
Executable file
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using TShockAPI.DB;
|
||||
namespace TShockAPI.Hooks
|
||||
{
|
||||
public class AccountDeleteEventArgs
|
||||
{
|
||||
public User User { get; set; }
|
||||
|
||||
public AccountDeleteEventArgs(User user)
|
||||
{
|
||||
this.User = user;
|
||||
}
|
||||
}
|
||||
|
||||
public class AccountCreateEventArgs
|
||||
{
|
||||
public User User { get; set; }
|
||||
|
||||
public AccountCreateEventArgs(User user)
|
||||
{
|
||||
this.User = user;
|
||||
}
|
||||
}
|
||||
|
||||
public class AccountHooks
|
||||
{
|
||||
public delegate void AccountCreateD(AccountCreateEventArgs e);
|
||||
public static event AccountCreateD AccountCreate;
|
||||
|
||||
public static void OnAccountCreate(User u)
|
||||
{
|
||||
if (AccountCreate == null)
|
||||
return;
|
||||
|
||||
AccountCreate(new AccountCreateEventArgs(u));
|
||||
}
|
||||
|
||||
public delegate void AccountDeleteD(AccountDeleteEventArgs e);
|
||||
public static event AccountDeleteD AccountDelete;
|
||||
|
||||
public static void OnAccountDelete(User u)
|
||||
{
|
||||
if (AccountDelete == null)
|
||||
return;
|
||||
|
||||
AccountDelete(new AccountDeleteEventArgs(u));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
14
TShockAPI/Properties/AssemblyInfo.cs
Normal file → Executable file
14
TShockAPI/Properties/AssemblyInfo.cs
Normal file → Executable file
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -28,7 +28,7 @@ using System.Runtime.InteropServices;
|
|||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Nyx Studios & TShock Contributors")]
|
||||
[assembly: AssemblyProduct("TShockAPI")]
|
||||
[assembly: AssemblyCopyright("Copyright © Nyx Studios 2011-2014")]
|
||||
[assembly: AssemblyCopyright("Copyright © Nyx Studios 2011-2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
|
@ -47,7 +47,11 @@ using System.Runtime.InteropServices;
|
|||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// MMdd of the build
|
||||
// Starting in version 4.2.5, we are no longer including the fourth decimal
|
||||
// location, which previously held the date and time.
|
||||
|
||||
[assembly: AssemblyVersion("4.2.3.0909")]
|
||||
[assembly: AssemblyFileVersion("4.2.3.0909")]
|
||||
// Also, be sure to release on github with the exact assembly version tag as below
|
||||
// so that the update manager works correctly (via the Github releases api and mimic)
|
||||
|
||||
[assembly: AssemblyVersion("4.2.6")]
|
||||
[assembly: AssemblyFileVersion("4.2.6")]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -155,9 +155,10 @@ namespace Rests
|
|||
str = string.Format("{0}({1});", jsonp, str);
|
||||
}
|
||||
e.Response.Connection.Type = ConnectionType.Close;
|
||||
e.Response.ContentType = new ContentTypeHeader("application/json");
|
||||
e.Response.ContentType = new ContentTypeHeader("application/json; charset=utf-8");
|
||||
e.Response.Add(serverHeader);
|
||||
e.Response.Body.Write(Encoding.ASCII.GetBytes(str), 0, str.Length);
|
||||
var bytes = Encoding.UTF8.GetBytes(str);
|
||||
e.Response.Body.Write(bytes, 0, bytes.Length);
|
||||
e.Response.Status = HttpStatusCode.OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.ComponentModel;
|
||||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -76,7 +76,6 @@ namespace TShockAPI
|
|||
public static SecureRest RestApi;
|
||||
public static RestManager RestManager;
|
||||
public static Utils Utils = Utils.Instance;
|
||||
public static StatTracker StatTracker = new StatTracker();
|
||||
public static UpdateManager UpdateManager;
|
||||
/// <summary>
|
||||
/// Used for implementing REST Tokens prior to the REST system starting up.
|
||||
|
|
@ -266,8 +265,10 @@ namespace TShockAPI
|
|||
ServerApi.Hooks.WorldChristmasCheck.Register(this, OnXmasCheck);
|
||||
ServerApi.Hooks.WorldHalloweenCheck.Register(this, OnHalloweenCheck);
|
||||
ServerApi.Hooks.NetNameCollision.Register(this, NetHooks_NameCollision);
|
||||
TShockAPI.Hooks.PlayerHooks.PlayerPreLogin += OnPlayerPreLogin;
|
||||
TShockAPI.Hooks.PlayerHooks.PlayerPostLogin += OnPlayerLogin;
|
||||
Hooks.PlayerHooks.PlayerPreLogin += OnPlayerPreLogin;
|
||||
Hooks.PlayerHooks.PlayerPostLogin += OnPlayerLogin;
|
||||
Hooks.AccountHooks.AccountDelete += OnAccountDelete;
|
||||
Hooks.AccountHooks.AccountCreate += OnAccountCreate;
|
||||
|
||||
GetDataHandlers.InitGetDataHandler();
|
||||
Commands.InitCommands();
|
||||
|
|
@ -380,6 +381,16 @@ namespace TShockAPI
|
|||
Users.UpdateLogin(u);
|
||||
}
|
||||
|
||||
private void OnAccountDelete(Hooks.AccountDeleteEventArgs args)
|
||||
{
|
||||
CharacterDB.RemovePlayer(args.User.ID);
|
||||
}
|
||||
|
||||
private void OnAccountCreate(Hooks.AccountCreateEventArgs args)
|
||||
{
|
||||
CharacterDB.SeedInitialData(Users.GetUser(args.User));
|
||||
}
|
||||
|
||||
private void OnPlayerPreLogin(Hooks.PlayerPreLoginEventArgs args)
|
||||
{
|
||||
if (args.Player.IsLoggedIn)
|
||||
|
|
@ -613,7 +624,6 @@ namespace TShockAPI
|
|||
ComputeMaxStyles();
|
||||
FixChestStacks();
|
||||
|
||||
StatTracker.Initialize();
|
||||
UpdateManager = new UpdateManager();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@
|
|||
<Compile Include="DB\ProjectileManager.cs" />
|
||||
<Compile Include="DB\RegionManager.cs" />
|
||||
<Compile Include="DB\TileManager.cs" />
|
||||
<Compile Include="Hooks\AccountHooks.cs" />
|
||||
<Compile Include="Hooks\GeneralHooks.cs" />
|
||||
<Compile Include="Hooks\PlayerHooks.cs" />
|
||||
<Compile Include="PaginationTools.cs" />
|
||||
|
|
@ -181,7 +182,7 @@
|
|||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties BuildVersion_IncrementBeforeBuild="False" BuildVersion_StartDate="2011/6/17" BuildVersion_BuildVersioningStyle="None.None.None.MonthAndDayStamp" BuildVersion_BuildAction="Both" BuildVersion_UpdateFileVersion="True" BuildVersion_UpdateAssemblyVersion="True" />
|
||||
<UserProperties BuildVersion_UpdateAssemblyVersion="True" BuildVersion_UpdateFileVersion="True" BuildVersion_BuildAction="Both" BuildVersion_BuildVersioningStyle="None.None.None.MonthAndDayStamp" BuildVersion_StartDate="2011/6/17" BuildVersion_IncrementBeforeBuild="False" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
extensions: .cs
|
||||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
13
TShockAPI/UpdateManager.cs
Normal file → Executable file
13
TShockAPI/UpdateManager.cs
Normal file → Executable file
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -27,12 +27,12 @@ namespace TShockAPI
|
|||
{
|
||||
public class UpdateManager
|
||||
{
|
||||
private string updateUrl = "https://github.com/NyxStudios/TShock/blob/general-devel/tshock_update.json?raw=true";
|
||||
private string updateUrl = "http://update.tshock.co/latest/";
|
||||
|
||||
/// <summary>
|
||||
/// Check once every X minutes.
|
||||
/// </summary>
|
||||
private readonly int CheckXMinutes = 30;
|
||||
private int CheckXMinutes = 30;
|
||||
|
||||
public UpdateManager()
|
||||
{
|
||||
|
|
@ -44,11 +44,12 @@ namespace TShockAPI
|
|||
try
|
||||
{
|
||||
UpdateCheck(state);
|
||||
CheckXMinutes = 30;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
//swallow the exception
|
||||
return;
|
||||
// Skip this run and check more frequently...
|
||||
CheckXMinutes = 5;
|
||||
}
|
||||
|
||||
Thread.Sleep(CheckXMinutes * 60 * 1000);
|
||||
|
|
@ -115,7 +116,7 @@ namespace TShockAPI
|
|||
|
||||
private void NotifyAdministrator(TSPlayer player, string[] changes)
|
||||
{
|
||||
player.SendMessage("The server is out of date.", Color.Red);
|
||||
player.SendMessage("The server is out of date. Latest version: ", Color.Red);
|
||||
for (int j = 0; j < changes.Length; j++)
|
||||
{
|
||||
player.SendMessage(changes[j], Color.Red);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
TShock, a server mod for Terraria
|
||||
Copyright (C) 2011-2014 Nyx Studios (fka. The TShock Team)
|
||||
Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
|
||||
<PropertyGroup>
|
||||
<ProjectType>local</ProjectType>
|
||||
<ProjectVersion>7.10.377</ProjectVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{1528EA3F-A6D2-49F6-BF75-7A842CF4D97B}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<AssemblyName>TShock</AssemblyName>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Xna.Framework.Game" />
|
||||
<Reference Include="Microsoft.Xna.Framework" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="Microsoft.Xna.Framework.Graphics" />
|
||||
<Reference Include="Microsoft.Xna.Framework.Xact" />
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Reference Include="System.Drawing" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 2fc5b098323ce7062df5ed91b1c532066fb8cb65
|
||||
Subproject commit 50a04c45bfc2d1de2de1a31b215f7bdc546cfdd5
|
||||
49
deploy_release.py
Normal file
49
deploy_release.py
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
import requests
|
||||
import json
|
||||
import sys
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
create_release_url = 'https://api.github.com/repos/NyxStudios/TShock/releases'
|
||||
|
||||
#Load variables from ENV, which are put there by the bamboo build.
|
||||
branch = os.environ["GIT_BRANCH"]
|
||||
tag_name = os.environ["bamboo_tag_name"]
|
||||
name = os.environ["bamboo_release_name"]
|
||||
body = os.environ["bamboo_release_body"]
|
||||
|
||||
#build release file name using the tag, stripping the 'v' off the front ie 'v.1.2.3' => '.1.2.3' resulting in a file called 'tshock.1.2.3.zip'
|
||||
release_name = 'tshock_' + tag_name[1:] + '.zip'
|
||||
|
||||
#because we can't find any other secure way to get a token into this script run from bamboo :'(
|
||||
with open('/home/bamboo/scripts/token.py') as f:
|
||||
token = f.read().rsplit('=', 1)[1].strip()
|
||||
|
||||
#invoke the mv command on the artifact from bamboo to the new name above
|
||||
subprocess.call('mv tshock_release.zip ' + release_name, shell=True)
|
||||
|
||||
#construct the payload for the post request to github to create the release.
|
||||
data = {'tag_name':tag_name, 'target_commitish':branch, 'name':name, 'body':body, 'draft':False, 'prerelease':False}
|
||||
#headers for the post request with our oauth token, allowing us write access
|
||||
create_headers = {'Content-Type': 'application/json', 'Authorization': 'token ' + token}
|
||||
#payload is a json string, not a strong typed json object
|
||||
json_data = json.dumps(data)
|
||||
|
||||
#make the post request, creating a release
|
||||
r = requests.post(create_release_url, data=json_data, headers=create_headers)
|
||||
#parse the response into an object
|
||||
json_response = json.loads(r.text)
|
||||
|
||||
#extract the relevant information from the object needed to attach a binary to the release created previously
|
||||
release_id = json_response['id']
|
||||
upload_url = json_response['upload_url'].rsplit('{')[0]
|
||||
|
||||
#construct the post url using the release name, as that is required by the api
|
||||
upload_url = upload_url + '?name=' + release_name
|
||||
|
||||
#headers for the post request, need to specify that our file is a zip, and how large it is
|
||||
upload_headers = {'Authorization': 'token ' + token, 'Content-Type':'application/zip', 'Content-Length':str(os.path.getsize(release_name))}
|
||||
|
||||
#upload the binary, resulting in a complete binary
|
||||
r = requests.post(upload_url, data=open(release_name, 'rb'), headers = upload_headers, verify=False)
|
||||
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
@echo off
|
||||
:main
|
||||
echo Generating Pandoc docs
|
||||
cd src
|
||||
for %%F in (*.md) do pandoc %%F > %%F.html
|
||||
pause
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
# Building
|
||||
|
||||
1. Install [Pandoc](http://johnmacfarlane.net/pandoc).
|
||||
2. cd to docs/src
|
||||
3. pandoc index.md -o ../index.html
|
||||
4. pandoc permissions.md -o ../permissions.html
|
||||
|
||||
# Adding stuff
|
||||
|
||||
1. Everything is [Markdown](http://daringfireball.net/projects/markdown/)
|
||||
2. If you add a new page, include [Markdown-CSS](https://github.com/clownfart/Markdown-CSS) for best results.
|
||||
|
||||
# Demo
|
||||
|
||||
You can access the docs at the [TShock Github Page](http://tshock.github.com/).
|
||||
|
|
@ -1,580 +0,0 @@
|
|||
<link href="https://raw.github.com/clownfart/Markdown-CSS/master/markdown.css" rel="stylesheet"></link>
|
||||
|
||||
# The config file
|
||||
|
||||
[Back to index](index.md.html)
|
||||
|
||||
----
|
||||
|
||||
Each TShock installation automatically generates a configuration file which can edit basic settings when the server starts.
|
||||
|
||||
The file "config.json" is located in the *tshock* folder, in the same directory as TerrariaServer.exe.
|
||||
|
||||
Being a JSON file, it is extremely critical that you edit the file in a standard text editor. Use [Notepad++](http://notepad-plus-plus.org/) to edit your file, or another text editor used for programming. Before restarting TShock, check the syntax of your file using [JSONLint](http://jsonlint.com/), and verify that it contains no errors.
|
||||
|
||||
An example configuration file is below.
|
||||
|
||||
{
|
||||
"InvasionMultiplier": 1,
|
||||
"DefaultMaximumSpawns": 0,
|
||||
"DefaultSpawnRate": 600,
|
||||
"ServerPort": 7777,
|
||||
"EnableWhitelist": false,
|
||||
"InfiniteInvasion": false,
|
||||
"PvPMode": "normal",
|
||||
"SpawnProtection": true,
|
||||
"SpawnProtectionRadius": 5,
|
||||
"MaxSlots": 8,
|
||||
"RangeChecks": true,
|
||||
"DisableBuild": false,
|
||||
"SuperAdminChatRGB": [
|
||||
255.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"SuperAdminChatPrefix": "(Admin) ",
|
||||
"SuperAdminChatSuffix": "",
|
||||
"BackupInterval": 0,
|
||||
"BackupKeepFor": 60,
|
||||
"RememberLeavePos": false,
|
||||
"HardcoreOnly": false,
|
||||
"MediumcoreOnly": false,
|
||||
"KickOnMediumcoreDeath": false,
|
||||
"BanOnMediumcoreDeath": false,
|
||||
"AutoSave": true,
|
||||
"AnnounceSave": true,
|
||||
"MaximumLoginAttempts": 3,
|
||||
"RconPassword": "",
|
||||
"RconPort": 7777,
|
||||
"ServerName": "",
|
||||
"MasterServer": "127.0.0.1",
|
||||
"StorageType": "sqlite",
|
||||
"MySqlHost": "localhost:3306",
|
||||
"MySqlDbName": "",
|
||||
"MySqlUsername": "",
|
||||
"MySqlPassword": "",
|
||||
"MediumcoreBanReason": "Death results in a ban",
|
||||
"MediumcoreKickReason": "Death results in a kick",
|
||||
"EnableDNSHostResolution": false,
|
||||
"EnableIPBans": true,
|
||||
"EnableBanOnUsernames": false,
|
||||
"DefaultRegistrationGroupName": "default",
|
||||
"DefaultGuestGroupName": "guest",
|
||||
"DisableSpewLogs": true,
|
||||
"HashAlgorithm": "sha512",
|
||||
"BufferPackets": true,
|
||||
"ServerFullReason": "Server is full",
|
||||
"ServerFullNoReservedReason": "Server is full. No reserved slots open.",
|
||||
"SaveWorldOnCrash": true,
|
||||
"EnableGeoIP": false,
|
||||
"EnableTokenEndpointAuthentication": false,
|
||||
"ServerNickname": "TShock Server",
|
||||
"RestApiEnabled": false,
|
||||
"RestApiPort": 7878,
|
||||
"DisableTombstones": true,
|
||||
"DisplayIPToAdmins": false,
|
||||
"EnableInsecureTileFixes": true,
|
||||
"KickProxyUsers": true,
|
||||
"DisableHardmode": false,
|
||||
"DisableDungeonGuardian": false,
|
||||
"ServerSideInventory": false,
|
||||
"ServerSideInventorySave": 15,
|
||||
"LogonDiscardThreshold": 250,
|
||||
"DisablePlayerCountReporting": false,
|
||||
"DisableClownBombs": false,
|
||||
"DisableSnowBalls": false,
|
||||
"ChatFormat": "{1}{2}{3}: {4}",
|
||||
"ForceTime": "normal",
|
||||
"TileKillThreshold": 60,
|
||||
"TilePlaceThreshold": 20,
|
||||
"TileLiquidThreshold": 15,
|
||||
"ProjectileThreshold": 50,
|
||||
"ProjIgnoreShrapnel": true,
|
||||
"RequireLogin": true,
|
||||
"DisableInvisPvP": false,
|
||||
"MaxRangeForDisabled": 10,
|
||||
"ServerPassword": "",
|
||||
"RegionProtectChests": false,
|
||||
"DisableLoginBeforeJoin": false,
|
||||
"AllowRegisterAnyUsername": false,
|
||||
"AllowLoginAnyUsername": true,
|
||||
"MaxDamage": 175,
|
||||
"MaxProjDamage": 175,
|
||||
"IgnoreProjUpdate": false,
|
||||
"IgnoreProjKill": false,
|
||||
"IgnoreNoClip": false,
|
||||
"AllowIce": true
|
||||
}
|
||||
|
||||
In this file, if you wanted to change the maximum players to 64, you would edit that the file so that the line referring to max players looked like so:
|
||||
|
||||
"MaxSlots": 64,
|
||||
|
||||
The following is the official documentation for the configuration file:
|
||||
|
||||
## AllowCorruptionCreep
|
||||
**Type:** Boolean
|
||||
**Description:** Allows corrutption to spread when a world is hardmode.
|
||||
**Default:** "True"
|
||||
|
||||
## AllowHallowCreep
|
||||
**Type:** Boolean
|
||||
**Description:** Allows hallow to spread when a world is hardmode.
|
||||
**Default:** "True"
|
||||
|
||||
## AllowIce
|
||||
**Type:** Boolean
|
||||
**Description:** Allow Ice placement even when user does not have canbuild
|
||||
**Default:** "False"
|
||||
|
||||
## AllowLoginAnyUsername
|
||||
**Type:** Boolean
|
||||
**Description:** Allows users to login with any username with /login
|
||||
**Default:** "True"
|
||||
|
||||
## AllowRegisterAnyUsername
|
||||
**Type:** Boolean
|
||||
**Description:** Allows users to register any username with /register
|
||||
**Default:** "False"
|
||||
|
||||
## AutoSave
|
||||
**Type:** Boolean
|
||||
**Description:** Enable/Disable Terrarias built in auto save
|
||||
**Default:** "True"
|
||||
|
||||
## AnnounceSave
|
||||
**Type:** Boolean
|
||||
**Description:** Enable/Disable save announcements
|
||||
**Default:** "True"
|
||||
|
||||
## BackupInterval
|
||||
**Type:** Int32
|
||||
**Description:** Backup frequency in minutes. So, a value of 60 = 60 minutes. Backups are stored in the \tshock\backups folder.
|
||||
**Default:** "0"
|
||||
|
||||
## BackupKeepFor
|
||||
**Type:** Int32
|
||||
**Description:** How long backups are kept in minutes. 2880 = 2 days.
|
||||
**Default:** "60"
|
||||
|
||||
## BanOnMediumcoreDeath
|
||||
**Type:** Boolean
|
||||
**Description:** Bans a Hardcore player on death.
|
||||
**Default:** "False"
|
||||
|
||||
## BufferPackets
|
||||
**Type:** Boolean
|
||||
**Description:** Buffers up the packets and sends them out at the end of each frame
|
||||
**Default:** "True"
|
||||
|
||||
## ChatFormat
|
||||
**Type:** String
|
||||
**Description:** Change ingame chat format, {0} = Group Name, {1} = Group Prefix, {2} = Player Name, {3} = Group Suffix, {4} = Chat Message
|
||||
**Default:** "{1}{2}{3}: {4}"
|
||||
|
||||
## DefaultGuestGroupName
|
||||
**Type:** String
|
||||
**Description:** Selects the default group name to place non registered users under
|
||||
**Default:** "guest"
|
||||
|
||||
## DefaultMaximumSpawns
|
||||
**Type:** Int32
|
||||
**Description:** The default maximum mobs that will spawn per wave. Higher means more mobs in that wave.
|
||||
**Default:** "5"
|
||||
|
||||
## DefaultRegistrationGroupName
|
||||
**Type:** String
|
||||
**Description:** Selects the default group name to place new registrants under
|
||||
**Default:** "default"
|
||||
|
||||
## DefaultSpawnRate
|
||||
**Type:** Int32
|
||||
**Description:** The delay between waves. Shorter values lead to less mobs.
|
||||
**Default:** "600"
|
||||
|
||||
## DisableBuild
|
||||
**Type:** Boolean
|
||||
**Description:** Disables any building; placing of blocks
|
||||
**Default:** "False"
|
||||
|
||||
## DisableClownBombs
|
||||
**Type:** Boolean
|
||||
**Description:** Disables clown bomb projectiles from spawning
|
||||
**Default:** "False"
|
||||
|
||||
## DisableDungeonGuardian
|
||||
**Type:** Boolean
|
||||
**Description:** Disables Dungeon Guardian from being spawned by player packets, this will instead force a respawn
|
||||
**Default:** "False"
|
||||
|
||||
## DisableHardmode
|
||||
**Type:** Boolean
|
||||
**Description:** Disables hardmode, can't never be activated. Overrides /starthardmode
|
||||
**Default:** "False"
|
||||
|
||||
## DisableInvisPvP
|
||||
**Type:** Boolean
|
||||
**Description:** Disables Invisibility potions from being used in PvP (Note, they can use them on the client, but the effect isn't sent to the rest of the server)
|
||||
**Default:** "False"
|
||||
|
||||
## DisableLoginBeforeJoin
|
||||
**Type:** Boolean
|
||||
**Description:** Disable users from being able to login with account password when joining
|
||||
**Default:** "False"
|
||||
|
||||
## DisablePiggybanksOnSSI
|
||||
**Type:** Boolean
|
||||
**Description:** Prevent banks on SSI
|
||||
**Default:** "False"
|
||||
|
||||
## DisablePlayerCountReporting
|
||||
**Type:** Boolean
|
||||
**Description:** Disables reporting of playercount to the stat system.
|
||||
**Default:** "False"
|
||||
|
||||
## DisableSnowBalls
|
||||
**Type:** Boolean
|
||||
**Description:** Disables snow ball projectiles from spawning
|
||||
**Default:** "False"
|
||||
|
||||
## DisableSpewLogs
|
||||
**Type:** Boolean
|
||||
**Description:** Force-Disable printing logs to players with the log permission
|
||||
**Default:** "True"
|
||||
|
||||
## DisableTombstones
|
||||
**Type:** Boolean
|
||||
**Description:** Disable tombstones for all players.
|
||||
**Default:** "True"
|
||||
|
||||
## DisplayIPToAdmins
|
||||
**Type:** Boolean
|
||||
**Description:** Displays a player's IP on join to everyone who has the log permission
|
||||
**Default:** "False"
|
||||
|
||||
## EnableBanOnUsernames
|
||||
**Type:** Boolean
|
||||
**Description:** Enables kicking of banned users by matching their Character Name
|
||||
**Default:** "False"
|
||||
|
||||
## EnableDNSHostResolution
|
||||
**Type:** Boolean
|
||||
**Description:** Enables DNS resolution of incoming connections with GetGroupForIPExpensive.
|
||||
**Default:** "False"
|
||||
|
||||
## EnableGeoIP
|
||||
**Type:** Boolean
|
||||
**Description:** This will announce a player's location on join
|
||||
**Default:** "False"
|
||||
|
||||
## EnableInsecureTileFixes
|
||||
**Type:** Boolean
|
||||
**Description:** Some tiles are 'fixed' by not letting TShock handle them. Disabling this may break certain asthetic tiles.
|
||||
**Default:** "True"
|
||||
|
||||
## EnableIPBans
|
||||
**Type:** Boolean
|
||||
**Description:** Enables kicking of banned users by matching their IP Address
|
||||
**Default:** "True"
|
||||
|
||||
## EnableTokenEndpointAuthentication
|
||||
**Type:** Boolean
|
||||
**Description:** This will turn on a token requirement for the /status API endpoint.
|
||||
**Default:** "False"
|
||||
|
||||
## EnableWhitelist
|
||||
**Type:** Boolean
|
||||
**Description:** Enable or disable the whitelist based on IP addresses in whitelist.txt
|
||||
**Default:** "False"
|
||||
|
||||
## ForceTime
|
||||
**Type:** String
|
||||
**Description:** Force the world time to be normal, day, or night
|
||||
**Default:** "normal"
|
||||
|
||||
## HardcoreOnly
|
||||
**Type:** Boolean
|
||||
**Description:** Hardcore players ONLY. This means softcore players cannot join.
|
||||
**Default:** "False"
|
||||
|
||||
## HashAlgorithm
|
||||
**Type:** String
|
||||
**Description:** Valid types are "sha512", "sha256", "md5", append with "-xp" for the xp supported algorithms
|
||||
**Default:** "sha512"
|
||||
|
||||
## IgnoreNoClip
|
||||
**Type:** Boolean
|
||||
**Description:** Ignores all no clip checks for players
|
||||
**Default:** "False"
|
||||
|
||||
## IgnoreProjKill
|
||||
**Type:** Boolean
|
||||
**Description:** Ignores checking to see if player 'can' kill a projectile
|
||||
**Default:** "False"
|
||||
|
||||
## IgnoreProjUpdate
|
||||
**Type:** Boolean
|
||||
**Description:** Ignores checking to see if player 'can' update a projectile
|
||||
**Default:** "False"
|
||||
|
||||
## InfiniteInvasion
|
||||
**Type:** Boolean
|
||||
**Description:** Enable the ability for invaison size to never decrease. Make sure to run /invade, and note that this adds 2 million+ goblins to the spawn que for the map.
|
||||
**Default:** "False"
|
||||
|
||||
## InvasionMultiplier
|
||||
**Type:** Int32
|
||||
**Description:** The equation for calculating invasion size is 100 + (multiplier * (number of active players with greater than 200 health))
|
||||
**Default:** "1"
|
||||
|
||||
## KickOnMediumcoreDeath
|
||||
**Type:** Boolean
|
||||
**Description:** Kicks a Hardcore player on death.
|
||||
**Default:** "False"
|
||||
|
||||
## KickProxyUsers
|
||||
**Type:** Boolean
|
||||
**Description:** Kicks users using a proxy as identified with the GeoIP database
|
||||
**Default:** "True"
|
||||
|
||||
## LogonDiscardThreshold
|
||||
**Type:** Int32
|
||||
**Description:** Time, in milliseconds, to disallow discarding items after logging in when ServerSideInventory is ON
|
||||
**Default:** "250"
|
||||
|
||||
## MasterServer
|
||||
**Type:** String
|
||||
**Description:** Not implemented
|
||||
**Default:** "127.0.0.1"
|
||||
|
||||
## MaxDamage
|
||||
**Type:** Int32
|
||||
**Description:** The maximum damage a player/npc can inflict
|
||||
**Default:** "175"
|
||||
|
||||
## MaximumLoginAttempts
|
||||
**Type:** Int32
|
||||
**Description:** Number of failed login attempts before kicking the player.
|
||||
**Default:** "3"
|
||||
|
||||
## MaxProjDamage
|
||||
**Type:** Int32
|
||||
**Description:** The maximum damage a projectile can inflict
|
||||
**Default:** "175"
|
||||
|
||||
## MaxRangeForDisabled
|
||||
**Type:** Int32
|
||||
**Description:** The maximum distance players disabled for various reasons can move from
|
||||
**Default:** "10"
|
||||
|
||||
## MaxSlots
|
||||
**Type:** Int32
|
||||
**Description:** Max slots for the server. If you want people to be kicked with "Server is full" set this to how many players you want max and then set Terraria max players to 2 higher.
|
||||
**Default:** "8"
|
||||
|
||||
## MediumcoreBanReason
|
||||
**Type:** String
|
||||
**Description:** Bans a Mediumcore player on death.
|
||||
**Default:** "Death results in a ban"
|
||||
|
||||
## MediumcoreKickReason
|
||||
**Type:** String
|
||||
**Description:** Kicks a Mediumcore player on death.
|
||||
**Default:** "Death results in a kick"
|
||||
|
||||
## MediumcoreOnly
|
||||
**Type:** Boolean
|
||||
**Description:** Mediumcore players ONLY. This means softcore players cannot join.
|
||||
**Default:** "False"
|
||||
|
||||
## MySqlDbName
|
||||
**Type:** String
|
||||
**Description:** Database name to connect to
|
||||
**Default:** ""
|
||||
|
||||
## MySqlHost
|
||||
**Type:** String
|
||||
**Description:** The MySQL Hostname and port to direct connections to
|
||||
**Default:** "localhost:3306"
|
||||
|
||||
## MySqlPassword
|
||||
**Type:** String
|
||||
**Description:** Database password to connect with
|
||||
**Default:** ""
|
||||
|
||||
## MySqlUsername
|
||||
**Type:** String
|
||||
**Description:** Database username to connect with
|
||||
**Default:** ""
|
||||
|
||||
## PreventBannedItemSpawn
|
||||
**Type:** Boolean
|
||||
**Description:** Prevent banned items from being /i or /give
|
||||
**Default:** "False"
|
||||
|
||||
## ProjectileThreshold
|
||||
**Type:** Int32
|
||||
**Description:** Disable a player if they exceed this number of projectile new within 1 second.
|
||||
**Default:** "50"
|
||||
|
||||
## ProjIgnoreShrapnel
|
||||
**Type:** Boolean
|
||||
**Description:** Ignore shrapnel from crystal bullets for Projectile Threshold.
|
||||
**Default:** "True"
|
||||
|
||||
## PvPMode
|
||||
**Type:** String
|
||||
**Description:** Set the server pvp mode. Vaild types are, "normal", "always", "disabled"
|
||||
**Default:** "normal"
|
||||
|
||||
## RangeChecks
|
||||
**Type:** Boolean
|
||||
**Description:** Global protection agent for any block distance based anti-grief check.
|
||||
**Default:** "True"
|
||||
|
||||
## RconPassword
|
||||
**Type:** String
|
||||
**Description:** Not implemented
|
||||
**Default:** ""
|
||||
|
||||
## RconPort
|
||||
**Type:** Int32
|
||||
**Description:** Not implemented
|
||||
**Default:** "7777"
|
||||
|
||||
## RegionProtectChests
|
||||
**Type:** Boolean
|
||||
**Description:** Protect chests with region and build permissions
|
||||
**Default:** "False"
|
||||
|
||||
## RememberLeavePos
|
||||
**Type:** Boolean
|
||||
**Description:** Remembers where a player left off. It works by remembering the IP, NOT the character.
|
||||
eg. When you try to disconnect, and reconnect to be automatically placed at spawn, you'll be at your last location. Note: Won't save after server restarts.
|
||||
**Default:** "False"
|
||||
|
||||
## RequireLogin
|
||||
**Type:** Boolean
|
||||
**Description:** Require all players to register or login before being allowed to play.
|
||||
**Default:** "False"
|
||||
|
||||
## RestApiEnabled
|
||||
**Type:** Boolean
|
||||
**Description:** Enable/Disable the rest api.
|
||||
**Default:** "False"
|
||||
|
||||
## RestApiPort
|
||||
**Type:** Int32
|
||||
**Description:** This is the port which the rest api will listen on.
|
||||
**Default:** "7878"
|
||||
|
||||
## SaveWorldOnCrash
|
||||
**Type:** Boolean
|
||||
**Description:** This will save the world if Terraria crashes from an unhandled exception.
|
||||
**Default:** "True"
|
||||
|
||||
## ServerFullNoReservedReason
|
||||
**Type:** String
|
||||
**Description:** String that is used when kicking people when the server is full with no reserved slots.
|
||||
**Default:** "Server is full. No reserved slots open."
|
||||
|
||||
## ServerFullReason
|
||||
**Type:** String
|
||||
**Description:** String that is used when kicking people when the server is full.
|
||||
**Default:** "Server is full"
|
||||
|
||||
## ServerName
|
||||
**Type:** String
|
||||
**Description:** Used when replying to a rest /status request.
|
||||
**Default:** ""
|
||||
|
||||
## ServerNickname
|
||||
**Type:** String
|
||||
**Description:** This is used when the API endpoint /status is queried.
|
||||
**Default:** "TShock Server"
|
||||
|
||||
## ServerPassword
|
||||
**Type:** String
|
||||
**Description:** Server password required to join server
|
||||
**Default:** ""
|
||||
|
||||
## ServerPort
|
||||
**Type:** Int32
|
||||
**Description:** The port the server runs on.
|
||||
**Default:** "7777"
|
||||
|
||||
## ServerSideInventory
|
||||
**Type:** Boolean
|
||||
**Description:** Enable Server Side Inventory checks, EXPERIMENTAL
|
||||
**Default:** "False"
|
||||
|
||||
## ServerSideInventorySave
|
||||
**Type:** Int32
|
||||
**Description:** How often SSI should save, in minutes
|
||||
**Default:** "15"
|
||||
|
||||
## SpawnProtection
|
||||
**Type:** Boolean
|
||||
**Description:** Prevents tiles from being placed within SpawnProtectionRadius of the default spawn.
|
||||
**Default:** "True"
|
||||
|
||||
## SpawnProtectionRadius
|
||||
**Type:** Int32
|
||||
**Description:** Radius from spawn tile for SpawnProtection.
|
||||
**Default:** "10"
|
||||
|
||||
## StatueSpawn200
|
||||
**Type:** Int32
|
||||
**Description:** How many things a statue can spawn within 200 pixels(?) before it stops spawning. Default = 3
|
||||
**Default:** "3"
|
||||
|
||||
## StatueSpawn600
|
||||
**Type:** Int32
|
||||
**Description:** How many things a statue can spawn within 600 pixels(?) before it stops spawning. Default = 6
|
||||
**Default:** "6"
|
||||
|
||||
## StatueSpawnWorld
|
||||
**Type:** Int32
|
||||
**Description:** How many things a statue spawns can exist in the world before it stops spawning. Default = 10
|
||||
**Default:** "10"
|
||||
|
||||
## StorageType
|
||||
**Type:** String
|
||||
**Description:** Valid types are "sqlite" and "mysql"
|
||||
**Default:** "sqlite"
|
||||
|
||||
## SuperAdminChatPrefix
|
||||
**Type:** String
|
||||
**Description:** Super admin group chat prefix
|
||||
**Default:** "(Admin) "
|
||||
|
||||
## SuperAdminChatRGB
|
||||
**Type:** Single[]
|
||||
**Description:** #.#.#. = Red/Blue/Green - RGB Colors for the Admin Chat Color. Max value: 255
|
||||
**Default:** "System.Single[]"
|
||||
|
||||
## SuperAdminChatSuffix
|
||||
**Type:** String
|
||||
**Description:** Super admin group chat suffix
|
||||
**Default:** ""
|
||||
|
||||
## TileKillThreshold
|
||||
**Type:** Int32
|
||||
**Description:** Disable/Revert a player if they exceed this number of tile kills within 1 second.
|
||||
**Default:** "60"
|
||||
|
||||
## TileLiquidThreshold
|
||||
**Type:** Int32
|
||||
**Description:** Disable a player if they exceed this number of liquid sets within 1 second.
|
||||
**Default:** "15"
|
||||
|
||||
## TilePlaceThreshold
|
||||
**Type:** Int32
|
||||
**Description:** Disable/Revert a player if they exceed this number of tile places within 1 second.
|
||||
**Default:** "20"
|
||||
|
||||
## WhitelistKickReason
|
||||
**Type:** String
|
||||
**Description:** String that is used when a user is kicked due to not being on the whitelist.
|
||||
**Default:** "You are not on the whitelist."
|
||||
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
<link href="https://raw.github.com/clownfart/Markdown-CSS/master/markdown.css" rel="stylesheet"></link>
|
||||
|
||||
# TShock Downloaded Documentation
|
||||
|
||||
*Created for TShock version: 3.9.x.x*
|
||||
|
||||
*Last updated: 5/26/2012*
|
||||
|
||||
----
|
||||
|
||||
## Preface
|
||||
|
||||
Welcome to the official TShock for Terraria downloaded documentation. This guide will walk through the installation and basic configuration of your newly downloaded TShock server, and should provide a basic knowledge as to how to get help from outside resources if needed.
|
||||
|
||||
## Resources
|
||||
|
||||
* [The Confluence wiki](http://develop.tshock.co:8080/) contains the most up to date information compiled by the community members. If your question isn't answered here, you might find it there.
|
||||
* [The forums](http://tshock.co/xf/) provide an excellent place to ask other TShock users and developers questions. Please refrain from making posts about questions that may be answered here, however.
|
||||
* [Our Github page](http://github.com/TShock/TShock) is where you'll be able to find the source code and the bug tracker.
|
||||
* [IRC](irc://irc.shankshock.com/terraria) is our IRC channel, if you prefer that medium for support.
|
||||
* Lastly, we can be found in the "Nyx" channel on the Teamspeak 3 server: ts3.shankshock.com, port 9987.
|
||||
|
||||
----
|
||||
|
||||
## Table of contents
|
||||
|
||||
1. [Installation & basic usage](install.md.html)
|
||||
2. [Permissions](perms.md.html)
|
||||
3. [The config file](config.md.html)
|
||||
4. [Credits](#Credits)
|
||||
|
||||
----
|
||||
|
||||
## Credits<a id="Credits"></a>
|
||||
|
||||
TShock wouldn't be possible without:
|
||||
|
||||
* [Xenon Servers](http://xns.cc/)
|
||||
* [Kerplunc Gaming](http://kerpluncgaming.com/)
|
||||
* [Multiplay UK](http://multiplay.co.uk/)
|
||||
* [Atlassian](http://www.atlassian.com/)
|
||||
* [Github](http://github.com/)
|
||||
* You :)
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
<link href="https://raw.github.com/clownfart/Markdown-CSS/master/markdown.css" rel="stylesheet"></link>
|
||||
|
||||
# Install instructions & basic usage
|
||||
|
||||
[Back to index](index.md.html)
|
||||
|
||||
----
|
||||
|
||||
1. Assuming you've extracted TShock, you're done as far as files go. Run the TerrariaServer.exe file in the folder you've extracted TShock into.
|
||||
2. Check to verify that the server window states that some version of TerrariaShock is now running. If this is not the case, stop. Re-download all files and extract them to a new folder, being sure to keep the file structure in tact.
|
||||
3. Select a world and port to start the server. *TShock now uses its configuration file to control the number of players on the server. You can edit this value in the configuration file, discussed later. If you are generating a new world, you may experience a significantly longer time as the world creates itself. This is normal.
|
||||
4. Once the server is finished starting, you will be greeted with TShock's main console window. You will see a message in yellow that states "*To become superadmin, join the game and type /auth*" preceding a series of numbers. This set of numbers we will refer to as the "authcode" in succeeding steps.
|
||||
5. Connect to the server. Your IP address is 127.0.0.1, and the port will by default be on what you entered in the server console.
|
||||
6. Immediately chat the following: "**/auth [authcode]**". Replace [authcode] with the code given in the server console. Example: /auth 123456.
|
||||
7. Next, we will create a user account that you can login to. In the game, chat the command "**/user add [username]:[password] superadmin**". Replace [username] and [password] respectively with your appropriate details. You should be able to remeber your password, and it shouldn't be easily guessed. From now on, the phrase "run the command" is synonymous with "chat in the game chat box". In addition, where brackets ([]) are, we will assume you will replace those brackets with information that you have created.
|
||||
8. Assuming the last step was a success, login. Run the command "**/login [username] [password]**".
|
||||
9. To finalize installation, run the command "**/auth-verify**". This will disable the authcode, enable any previously disabled functionality, and allow the server to be used in production.
|
||||
|
||||
----
|
||||
|
||||
### Basic Usage<a id="Basics"></a>
|
||||
|
||||
Now that TShock is running, you may be interested in a few other features prior to playing Terraria.
|
||||
|
||||
* You can add admins through two methods. If the user is already registered, you can use "**/user group [username] [group-to-change-to]**". By default, TShock comes with the "vip" group, the "trustedadmin" group, and the "newadmin" group. If the user has yet to register, you can use "**/user add [username]:[password] [group]**" to generate an account with elevated permissions for them.
|
||||
* When you join the server and already have an account, the server will ask for your account password, even if the server has no password setup. In the event that you set a password on the server, unregistered users will be required to enter it. Users that already have an account must enter their own password.
|
||||
* If a user wishes to change accounts but retain their group, a config option exists that will allow you to allow users to login to accounts with any username.
|
||||
|
||||
----
|
||||
|
||||
## Closing remarks<a id="Closing"></a>
|
||||
|
||||
Thanks for downloading TShock. Your continued support helps make TShock what it is today. We wouldn't be here without you.
|
||||
|
||||
From everyone at TShock, thank-you.
|
||||
|
|
@ -1,259 +0,0 @@
|
|||
<link href="https://raw.github.com/clownfart/Markdown-CSS/master/markdown.css" rel="stylesheet"></link>
|
||||
|
||||
# Permission Nodes
|
||||
|
||||
These are the permissions that TShock currently supports, with associated commands. [Back to permissions](perms.md.html)
|
||||
|
||||
----
|
||||
|
||||
## <a id="allowclientsideworldedit">allowclientsideworldedit</a>
|
||||
**Description:** Allow unrestricted Send Tile Square usage, for client side world editing
|
||||
**Commands:** None
|
||||
|
||||
## <a id="annoy">annoy</a>
|
||||
**Description:** None
|
||||
**Commands:** /annoy
|
||||
|
||||
## <a id="ban">ban</a>
|
||||
**Description:** User can ban others
|
||||
**Commands:** /ban /banip /unban /unbanip
|
||||
|
||||
## <a id="buff">buff</a>
|
||||
**Description:** User can buff self
|
||||
**Commands:** /buff
|
||||
|
||||
## <a id="buffplayer">buffplayer</a>
|
||||
**Description:** User can buff other players
|
||||
**Commands:** /gbuff(/buffplayer)
|
||||
|
||||
## <a id="butcher">butcher</a>
|
||||
**Description:** User can kill all enemy npcs
|
||||
**Commands:** /butcher
|
||||
|
||||
## <a id="bypassinventorychecks">bypassinventorychecks</a>
|
||||
**Description:** Bypass Server Side Inventory checks
|
||||
**Commands:** None
|
||||
|
||||
## <a id="canbuild">canbuild</a>
|
||||
**Description:** Required to be able to build (modify tiles and liquid)
|
||||
**Commands:** None
|
||||
|
||||
## <a id="canchangepassword">canchangepassword</a>
|
||||
**Description:** User can change password in game
|
||||
**Commands:** /password
|
||||
|
||||
## <a id="canlogin">canlogin</a>
|
||||
**Description:** User can login in game
|
||||
**Commands:** /login
|
||||
|
||||
## <a id="canpartychat">canpartychat</a>
|
||||
**Description:** User can use party chat in game
|
||||
**Commands:** /p
|
||||
|
||||
## <a id="canregister">canregister</a>
|
||||
**Description:** User can register account in game
|
||||
**Commands:** /register
|
||||
|
||||
## <a id="cantalkinthird">cantalkinthird</a>
|
||||
**Description:** User can talk in third person
|
||||
**Commands:** /me
|
||||
|
||||
## <a id="causeevents">causeevents</a>
|
||||
**Description:** None
|
||||
**Commands:** /dropmeteor /star /fullmoon /bloodmoon /invade
|
||||
|
||||
## <a id="cfg">cfg</a>
|
||||
**Description:** User can edit sevrer configurations
|
||||
**Commands:** /setspawn /reload /serverpassword /save /settle /maxspawns /spawnrate /broadcast(/bc /say) /stats /world
|
||||
|
||||
## <a id="clearitems">clearitems</a>
|
||||
**Description:** User can clear item drops.
|
||||
**Commands:** /clear(/clearitems)
|
||||
|
||||
## <a id="converthardmode">converthardmode</a>
|
||||
**Description:** User can convert hallow into corruption and vice-versa
|
||||
**Commands:** /convertcorruption /converthallow /removespecial
|
||||
|
||||
## <a id="editspawn">editspawn</a>
|
||||
**Description:** Allows you to edit the spawn
|
||||
**Commands:** /antibuild /protectspawn
|
||||
|
||||
## <a id="grow">grow</a>
|
||||
**Description:** None
|
||||
**Commands:** /grow
|
||||
|
||||
## <a id="hardmode">hardmode</a>
|
||||
**Description:** User can change hardmode state.
|
||||
**Commands:** /hardmode /stophardmode(/disablehardmode)
|
||||
|
||||
## <a id="heal">heal</a>
|
||||
**Description:** None
|
||||
**Commands:** /heal
|
||||
|
||||
## <a id="ignoredamagecap">ignoredamagecap</a>
|
||||
**Description:** Prevents your actions from being ignored if damage is too high
|
||||
**Commands:** None
|
||||
|
||||
## <a id="ignorekilltiledetection">ignorekilltiledetection</a>
|
||||
**Description:** Prevents you from being reverted by kill tile abuse detection
|
||||
**Commands:** None
|
||||
|
||||
## <a id="ignoreliquidsetdetection">ignoreliquidsetdetection</a>
|
||||
**Description:** Prevents you from being disabled by liquid set abuse detection
|
||||
**Commands:** None
|
||||
|
||||
## <a id="ignorenoclipdetection">ignorenoclipdetection</a>
|
||||
**Description:** Prevents you from being reverted by no clip detection
|
||||
**Commands:** None
|
||||
|
||||
## <a id="ignoreplacetiledetection">ignoreplacetiledetection</a>
|
||||
**Description:** Prevents you from being reverted by place tile abuse detection
|
||||
**Commands:** None
|
||||
|
||||
## <a id="ignoreprojectiledetection">ignoreprojectiledetection</a>
|
||||
**Description:** Prevents you from being disabled by liquid set abuse detection
|
||||
**Commands:** None
|
||||
|
||||
## <a id="ignorestackhackdetection">ignorestackhackdetection</a>
|
||||
**Description:** Prevents you from being disabled by stack hack detection
|
||||
**Commands:** None
|
||||
|
||||
## <a id="ignorestathackdetection">ignorestathackdetection</a>
|
||||
**Description:** Prevents you from being kicked by hacked health detection
|
||||
**Commands:** None
|
||||
|
||||
## <a id="immunetoban">immunetoban</a>
|
||||
**Description:** Prevents you from being banned
|
||||
**Commands:** None
|
||||
|
||||
## <a id="immunetokick">immunetokick</a>
|
||||
**Description:** Prevents you from being kicked
|
||||
**Commands:** None
|
||||
|
||||
## <a id="item">item</a>
|
||||
**Description:** User can spawn items
|
||||
**Commands:** /item(/i) /give(/g)
|
||||
|
||||
## <a id="kick">kick</a>
|
||||
**Description:** User can kick others
|
||||
**Commands:** /kick
|
||||
|
||||
## <a id="kill">kill</a>
|
||||
**Description:** None
|
||||
**Commands:** /kill
|
||||
|
||||
## <a id="logs">logs</a>
|
||||
**Description:** Specific log messages are sent to users with this permission
|
||||
**Commands:** /displaylogs
|
||||
|
||||
## <a id="maintenance">maintenance</a>
|
||||
**Description:** User is notified when an update is available
|
||||
**Commands:** /clearbans /off(/exit) /restart /off-nosave(/exit-nosave) /checkupdates
|
||||
|
||||
## <a id="managegroup">managegroup</a>
|
||||
**Description:** User can manage groups
|
||||
**Commands:** /addgroup /delgroup /modgroup /group
|
||||
|
||||
## <a id="manageitem">manageitem</a>
|
||||
**Description:** User can manage item bans
|
||||
**Commands:** /additem(/banitem) /delitem(/unbanitem) /listitems(/listbanneditems) /additemgroup /delitemgroup
|
||||
|
||||
## <a id="manageregion">manageregion</a>
|
||||
**Description:** User can edit regions
|
||||
**Commands:** /region /debugreg
|
||||
|
||||
## <a id="managewarp">managewarp</a>
|
||||
**Description:** User can manage warps
|
||||
**Commands:** /setwarp /delwarp /hidewarp
|
||||
|
||||
## <a id="movenpc">movenpc</a>
|
||||
**Description:** User can change the homes of NPCs.
|
||||
**Commands:** None
|
||||
|
||||
## <a id="mute">mute</a>
|
||||
**Description:** User can mute and unmute users
|
||||
**Commands:** /mute(/unmute)
|
||||
|
||||
## <a id="pvpfun">pvpfun</a>
|
||||
**Description:** None
|
||||
**Commands:** /slap
|
||||
|
||||
## <a id="reservedslot">reservedslot</a>
|
||||
**Description:** Allows you to bypass the max slots for up to 5 slots above your max
|
||||
**Commands:** None
|
||||
|
||||
## <a id="restapi">restapi</a>
|
||||
**Description:** User can use rest api calls.
|
||||
**Commands:** None
|
||||
|
||||
## <a id="rootonly">rootonly</a>
|
||||
**Description:** Meant for super admins only
|
||||
**Commands:** /user /auth-verify
|
||||
|
||||
## <a id="savessi">savessi</a>
|
||||
**Description:** User can save all the players SSI state.
|
||||
**Commands:** /savessi /overridessi(/ossi)
|
||||
|
||||
## <a id="seeids">seeids</a>
|
||||
**Description:** User can see the id of players with /who
|
||||
**Commands:** None
|
||||
|
||||
## <a id="spawnboss">spawnboss</a>
|
||||
**Description:** User can spawn bosses
|
||||
**Commands:** /eater /eye /king /skeletron /wof(/wallofflesh) /twins /destroyer /skeletronp(/prime) /hardcore
|
||||
|
||||
## <a id="spawnmob">spawnmob</a>
|
||||
**Description:** User can spawn npcs
|
||||
**Commands:** /spawnmob(/sm)
|
||||
|
||||
## <a id="startinvasion">startinvasion</a>
|
||||
**Description:** User can start invasions (Goblin/Snow Legion) using items
|
||||
**Commands:** None
|
||||
|
||||
## <a id="summonboss">summonboss</a>
|
||||
**Description:** User can summon bosses using items
|
||||
**Commands:** None
|
||||
|
||||
## <a id="time">time</a>
|
||||
**Description:** None
|
||||
**Commands:** /time
|
||||
|
||||
## <a id="tp">tp</a>
|
||||
**Description:** User can teleport
|
||||
**Commands:** /home /spawn /tp
|
||||
|
||||
## <a id="tpall">tpall</a>
|
||||
**Description:** Users can tp to anyone
|
||||
**Commands:** None
|
||||
|
||||
## <a id="tpallow">tpallow</a>
|
||||
**Description:** Users can stop people from TPing to them
|
||||
**Commands:** /tpallow
|
||||
|
||||
## <a id="tphere">tphere</a>
|
||||
**Description:** User can teleport people to them
|
||||
**Commands:** /tphere /sendwarp(/sw)
|
||||
|
||||
## <a id="tphide">tphide</a>
|
||||
**Description:** Users can tp to people without showing a notice
|
||||
**Commands:** None
|
||||
|
||||
## <a id="usebanneditem">usebanneditem</a>
|
||||
**Description:** Allows you to use banned items
|
||||
**Commands:** None
|
||||
|
||||
## <a id="userinfo">userinfo</a>
|
||||
**Description:** Allows player to get user info
|
||||
**Commands:** /userinfo(/ui)
|
||||
|
||||
## <a id="warp">warp</a>
|
||||
**Description:** User can use warps
|
||||
**Commands:** /warp
|
||||
|
||||
## <a id="whisper">whisper</a>
|
||||
**Description:** User can whisper to others
|
||||
**Commands:** /whisper(/w /tell) /reply(/r)
|
||||
|
||||
## <a id="whitelist">whitelist</a>
|
||||
**Description:** User can modify the whitelist
|
||||
**Commands:** /whitelist
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<link href="https://raw.github.com/clownfart/Markdown-CSS/master/markdown.css" rel="stylesheet"></link>
|
||||
|
||||
# Permissions
|
||||
|
||||
[Back to index](index.md.html)
|
||||
|
||||
## Permissions<a id="Permissions"></a>
|
||||
|
||||
Like Bukkit and other administrative modifications, TShock supports adding groups and permissions. In the current implementation, you can only edit groups ingame, adding and removing them isn't supported *yet*.
|
||||
|
||||
## Adding permissions:
|
||||
|
||||
To add a permission to a given group, use the command "**/modgroup [add|del] [group] [permission]**". Example: */modgroup add trustedadmin tpall*.
|
||||
|
||||
## Permission nodes:
|
||||
|
||||
[A list of permission nodes can be found here.](permissions.md.html)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"version": "4.2.3.0720",
|
||||
"changes": "TShock 4.2.3 for Terraria 1.2.4.1 Update 1\nhttp://tshock.co/xf/index.php?threads/tshock-4-2-3-for-terraria-1-2-4-1-update-1.3055/"
|
||||
"version": "9.9.9.9",
|
||||
"changes": "http://tshock.co/ to get the newest build \nThis version of UpdateManager is out of date."
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue