diff --git a/.gitignore b/.gitignore index 7856d7dfc..afd1b060f 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,6 @@ _ReSharper.* # GTFO NuGet stuff # #################### packages/* + +# Private key files # +scripts/ssh_private_key \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index f1d766dd2..e7d8daa76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,9 @@ language: csharp -solution: ./TShockAPI/TShockAPI.csproj +solution: "./TShockAPI/TShockAPI.csproj" +sudo: false install: - - nuget restore +- nuget restore +script: python ./scripts/create_release.py notifications: slack: - secure: O4Nibe2fdaUa2ZxuETUg6WEoQKvNM2CotnfaIVgm3fjfe61dfE1P+EgTpbwDG8646jSmpTqMDw8Z6I/WJwGTlXV/ZQsbwu63Cps4MgOTvPHZ0Lsye5azySlJZs1iI4ItYSj2czXfcnJ+qAl1SOOkXJrjB5uyTMWtDpCrSCFB3MA= + secure: O4Nibe2fdaUa2ZxuETUg6WEoQKvNM2CotnfaIVgm3fjfe61dfE1P+EgTpbwDG8646jSmpTqMDw8Z6I/WJwGTlXV/ZQsbwu63Cps4MgOTvPHZ0Lsye5azySlJZs1iI4ItYSj2czXfcnJ+qAl1SOOkXJrjB5uyTMWtDpCrSCFB3MA= \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c4e4301f..b1c9b41e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,13 @@ This is the rolling changelog for TShock for Terraria. Use past tense when adding new entries; sign your name off when you add or change something. This should primarily be things like user changes, not necessarily codebase changes unless it's really relevant or large. -## Upcoming Changes +## TShock 4.3.20 +* Security improvement: The auth system is now automatically disabled if a superadmin exists in the database (@Enerdy). +* Removed the `auth-verify` command since `auth` now serves its purpose when necessary (@Enerdy). +* Security: `/"` exploit can no longer break chat mute filters (@Simon311). +* Fixed an issue where sometimes players could connect briefly during server shutdown, leading to errors (@Simon311). +* Fixed wyverns despawning & not behaving like normal (@WhiteXZ). +* Fixed major security issue where InvokeClientConnect could be exploited to do terrible, terrible things (@Simon311, @nicatronTg, @popstarfreas, @ProfessorXZ). ## TShock 4.3.19 * Compatibility with Terraria 1.3.3.3 (@Simon311) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7d51b3b05..6382cc887 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,5 @@ +_When in doubt, make an issue. If any of these instructions are unclear, make an issue to discuss your issue or suggestion._ + ### Issue Guidelines Please follow these simple requirements before posting a bug report: @@ -11,7 +13,7 @@ Please follow these simple requirements before posting a bug report: Note: This includes the API by default. If you need only the API, you need to cd into that folder and do the following with the .sln file for the API. For those new to C#, the .sln and .csproj files contain the necessary definitions to do a complete source build using Microsoft or Mono build tools. - Checkout the source. -- Initialize the submodules: ```git submodule init``` +- Initialize the submodules: ```git submodule update --init``` - Open the source in your favorite text editor that supports .NET building and press the build button OR - Run ```msbuild TShock.sln``` in the root of the cloned folder on Windows in a 'Developer Command Prompt' OR - Run ```xbuild TShock.sln``` in the root of the cloned folder on Unix. @@ -20,11 +22,24 @@ Need help? Drop by Slack and we'll be happy to explain it with more words, step ### TShock Additions -If something is better suited to be a plugin for TShock, rather than a TShock core feature, it should not be added! +If something is better suited to be a plugin for TShock, rather than a TShock core feature, it should not be added! Project scope is at times questionable, though, so create an issue on Github for discussion first. If an issue is completely outside of the scope of TShock, it will be made clear in that issue what it is. + +_If you are confused, make a suggestion. We will determine scope and relevance for you._ + +_If a person makes a suggestion in Slack, capture the suggestion as a Github issue. If a suggestion crops up on the forums, make a Github issue to capture it. If you want, direct the user to make a suggestion on Github, but set an alarm/timer/reminder so that if they don't know how to use Github or they don't have an account, an issue is still made and discussed. Make it clear that the issue is a surrogate issue for a suggestion from Slack/the forums too._ ### Pull Request Dev Guidelines -These guidelines are for all contributors. Please join our Slack instance and ask about your idea first, if you're implementing a new feature, system, or changing an existing implementation. Pull requests that change large feature sets or swathes of code will be dissected for quality and purpose prior to approval, and requests that conflict with a team developer's work may be declined if the project is already being worked on internally, but not released. In addition, issues assigned to Nyx developers that are recent and fresh should be considered a no-go zone, while that developer works on their solution outside the scope of Github. +These guidelines are for all contributors. + +* Create an issue first to suggest an improvement or feature addition to TShock. +* Active developers will then give a go/no go for implementation. This is scope related: if an issue is within the scope of TShock, it will be tagged 'pr-wanted.' +* After 'pr-wanted' has been added, an issue should be considered workable in a pull request fashion. +* If you, as a developer, want to claim an issue for a PR, as soon as possible start work and note that in both the original issue and the new PR. The 'pr-wanted' tag will remain but the active PR will become the center for discussion for your implementation. +* If a TShock core developer takes an issue, they'll be assigned to the issue. If your issue was taken by a TShock developer and you were actively developing it in a PR, you should _make it clear as soon as possible that a process error has been made_ so that the your development resources and our development resources aren't wasted. +* Please send a pull request with at least a sentence description and something meaningful as the title, not just the issue number you're fixing. + +_The pr-wanted tag indicates an issue should be implemented. If an issue has a developer assigned, it indicates that they're working on it. When in doubt, ask where an issue is before starting work (so you don't waste time)!_ Even if you have write access to the repository, follow [Github flow](https://guides.github.com/introduction/flow/) when sending commits. Don't send commits directly to either ```master``` or ```general-devel``` unless those commits modify either the deploy scripts or non-code components. If it compiles, follow Github Flow. diff --git a/README.md b/README.md index 3a255e8af..babb85b43 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ -# TShock 中文版本 [![编译状态](https://travis-ci.org/mistzzt/TShock.png?branch=adv-cn_dev)](https://travis-ci.org/mistzzt/TShock) +

+ TShock for Terraria
+ 编译状态
+


+

## 中文版本的说明 diff --git a/TShockAPI/BackupManager.cs b/TShockAPI/BackupManager.cs index d039d1587..872f71a62 100644 --- a/TShockAPI/BackupManager.cs +++ b/TShockAPI/BackupManager.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 3ae58de7a..1cf196f31 100644 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 @@ -213,11 +213,7 @@ public static void InitCommands() AllowServer = false, HelpText = "首次登入游戏时验证超管." }); - add(new Command(Permissions.authverify, AuthVerify, "auth-verify", "完成验证") - { - HelpText = "关闭密钥验证超管." - }); - add(new Command(Permissions.user, ManageUsers, "user", "用户") + add(new Command(Permissions.user, ManageUsers, "user") { DoLog = false, HelpText = "管理用户账户." @@ -632,12 +628,31 @@ public static bool HandleCommand(TSPlayer player, string text) if (cmdPrefix == SilentSpecifier) silent = true; - var args = ParseParameters(cmdText); - if (args.Count < 1) - return false; + int index = -1; + for (int i = 0; i < cmdText.Length; i++) + { + if (IsWhiteSpace(cmdText[i])) + { + index = i; + break; + } + } + string cmdName; + if (index == 0) // Space after the command specifier should not be supported + { + player.SendErrorMessage("指令无效. 键入 {0}help 以获取可用指令.", Specifier); + return true; + } + else if (index < 0) + cmdName = cmdText.ToLower(); + else + cmdName = cmdText.Substring(0, index).ToLower(); - string cmdName = args[0].ToLower(); - args.RemoveAt(0); + List args; + if (index < 0) + args = new List(); + else + args = ParseParameters(cmdText.Substring(index)); IEnumerable cmds = ChatCommands.FindAll(c => c.HasAlias(cmdName)); @@ -992,8 +1007,9 @@ private static void RegisterUser(CommandArgs args) } else { - args.Player.SendErrorMessage("账户 " + user.Name + " 已经被注册了."); - TShock.Log.ConsoleInfo(args.Player.Name + " 尝试注册一个存在的账户: " + user.Name); + args.Player.SendErrorMessage("抱歉, 账号 " + user.Name + " 已经被其他人注册了."); + args.Player.SendErrorMessage("请用其他的名称注册."); + TShock.Log.ConsoleInfo(args.Player.Name + " 注册已有账户失败: " + user.Name); } } catch (UserManagerException ex) @@ -4631,62 +4647,56 @@ private static void AuthToken(CommandArgs args) { if (TShock.AuthToken == 0) { - args.Player.SendWarningMessage("密钥获取权限已停止, 该次非法尝试讲被记录."); - TShock.Utils.ForceKick(args.Player, "验证系统已经停止.", true, true); - TShock.Log.Warn("玩家 {0} 尝试执行被禁用的 {1}auth 指令.", args.Player.IP, Specifier); - return; - } - int givenCode = Convert.ToInt32(args.Parameters[0]); - if (givenCode == TShock.AuthToken && args.Player.Group.Name != "superadmin") - { - try - { - args.Player.Group = TShock.Utils.GetGroup("superadmin"); - args.Player.SendInfoMessage("你现在已经拥有临时超级管理权, 退出游戏后就会被系统收回."); - args.Player.SendInfoMessage("若想长期使用, 请按照下面步骤创建永久超级管理账户.."); - args.Player.SendInfoMessage("执行 -- {0}user add <用户名> <密码> superadmin", Specifier); - args.Player.SendInfoMessage("结果 -- <用户名>(<密码>) 会被添加到超管组."); - args.Player.SendInfoMessage("完成上述操作后, 执行 -- {0}login <用户名(若和玩家名一致, 可省略)> <密码> --.", Specifier); - args.Player.SendInfoMessage("若明白, 请按照上述说的执行, 完成后, 执行 {0}auth-verify 来关闭验证功能.", Specifier); - } - catch (UserManagerException ex) + if (args.Player.Group.Name == new SuperAdminGroup().Name) + args.Player.SendInfoMessage("验证系统已经被关闭."); + else { - TShock.Log.ConsoleError(ex.ToString()); - args.Player.SendErrorMessage(ex.Message); + args.Player.SendWarningMessage("验证系统被禁用; 本次尝试验证将被记录."); + TShock.Utils.ForceKick(args.Player, "验证系统被禁用.", true, true); + TShock.Log.Warn("{0} 在验证系统被禁用的情况下尝试执行 {1}auth", args.Player.IP, Specifier); + return; } - return; } - if (args.Player.Group.Name == "superadmin") + // If the user account is already a superadmin (permanent), disable the system + if (args.Player.IsLoggedIn && args.Player.tempGroup == null && args.Player.Group.Name == new SuperAdminGroup().Name) { - args.Player.SendInfoMessage("请禁用验证系统! 若需要帮助, 联系TShock论坛. https://tshock.co/"); - args.Player.SendInfoMessage("该账户为超级管理, 请完成下面提示的步骤完成TShock配置:"); - args.Player.SendInfoMessage("请使用该账户登录, 然后关闭超管验证功能."); - args.Player.SendInfoMessage("若明白, 请按照上述说的执行, 完成后, 执行 {0}auth-verify 来关闭验证功能.",Specifier); - return; + args.Player.SendSuccessMessage("你的新账户已经验证完毕, 同时 {0}auth 指令已被禁用.", Specifier); + args.Player.SendSuccessMessage("你可使用 {0}user 指令管理用户权限.", Specifier); + args.Player.SendSuccessMessage("验证系统会持续关闭. (删除 auth.lck 文件也不会开启)."); + args.Player.SendSuccessMessage("你可以在官方论坛分享你的服务器, 跟其他管理交流经验等.-- https://tshock.co/"); + args.Player.SendSuccessMessage("若需汉化方面的帮助, 请访问在Github的项目.-- https://github.com/mistzzt/TShock"); + args.Player.SendSuccessMessage("感谢使用 TShock ! 感谢对该汉化版本的支持."); + FileTools.CreateFile(Path.Combine(TShock.SavePath, "auth.lck")); + File.Delete(Path.Combine(TShock.SavePath, "authcode.txt")); + TShock.AuthToken = 0; + return; } - args.Player.SendErrorMessage("无效超管验证密钥. 该非法尝试将被记录."); - TShock.Log.Warn(args.Player.IP + " 尝试验证超管失败."); - } + if (args.Parameters.Count == 0) + { + args.Player.SendErrorMessage("你必须提供验证码!"); + return; + } - private static void AuthVerify(CommandArgs args) - { - if (TShock.AuthToken == 0) + int givenCode; + if (!Int32.TryParse(args.Parameters[0], out givenCode) || givenCode != TShock.AuthToken) { - args.Player.SendWarningMessage("看上去你已经关闭密钥验证功能了."); - args.Player.SendWarningMessage("若是不小心执行该指令, 删除 auth.lck 文件即可恢复功能."); + args.Player.SendErrorMessage("管理验证密码不正确; 该次尝试将被记录."); + TShock.Log.Warn(args.Player.IP + " 尝试使用一个不正确的超管验证码."); return; } - args.Player.SendSuccessMessage("你的新账户已经成功验证, 且密钥验证功能已经被关闭."); - args.Player.SendSuccessMessage("你以后可以使用 {0}user 管理用户. 记住不要删除 auth.lck 文件.", Specifier); - args.Player.SendSuccessMessage("你可以在官方论坛分享你的服务器, 跟其他管理交流经验等.-- https://tshock.co/"); - args.Player.SendSuccessMessage("若需汉化方面的帮助, 请访问在Github的项目.-- https://github.com/mistzzt/TShock"); - args.Player.SendSuccessMessage("感谢使用 TShock ! 感谢对该汉化版本的支持."); - FileTools.CreateFile(Path.Combine(TShock.SavePath, "auth.lck")); - File.Delete(Path.Combine(TShock.SavePath, "authcode.txt")); - TShock.AuthToken = 0; + if (args.Player.Group.Name != "superadmin") + args.Player.tempGroup = new SuperAdminGroup(); + + args.Player.SendInfoMessage("你现在已经拥有临时超级管理权, 退出游戏后就会被系统收回."); + args.Player.SendInfoMessage("若想长期使用, 请按照下面步骤创建永久超级管理账户."); + args.Player.SendInfoMessage("执行 -- {0}user add <用户名> <密码> superadmin", Specifier); + args.Player.SendInfoMessage("结果 -- <用户名>(<密码>) 会被添加到超管组."); + args.Player.SendInfoMessage("完成上述操作后, 执行 -- {0}login <用户名(若和玩家名一致, 可省略)> <密码> --.", Specifier); + args.Player.SendInfoMessage("若明白, 请按照上述说的执行; 完成后, 输入 {0}auth", Specifier); + return; } private static void ThirdPerson(CommandArgs args) diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index 4e8e90a87..085abdfdd 100755 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/DB/BanManager.cs b/TShockAPI/DB/BanManager.cs index 8507fc6bb..1fcb1d4cf 100755 --- a/TShockAPI/DB/BanManager.cs +++ b/TShockAPI/DB/BanManager.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/DB/CharacterManager.cs b/TShockAPI/DB/CharacterManager.cs index f1e5a5fca..e24612056 100755 --- a/TShockAPI/DB/CharacterManager.cs +++ b/TShockAPI/DB/CharacterManager.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/DB/DBTools.cs b/TShockAPI/DB/DBTools.cs index 8851a4701..38d005d46 100644 --- a/TShockAPI/DB/DBTools.cs +++ b/TShockAPI/DB/DBTools.cs @@ -1,3 +1,21 @@ +/* +TShock, a server mod for Terraria +Copyright (C) 2011-2016 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 . +*/ + using System; using System.Collections.Generic; using System.Data; diff --git a/TShockAPI/DB/GroupManager.cs b/TShockAPI/DB/GroupManager.cs index 9518d3f70..734f13416 100755 --- a/TShockAPI/DB/GroupManager.cs +++ b/TShockAPI/DB/GroupManager.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/DB/IQueryBuilder.cs b/TShockAPI/DB/IQueryBuilder.cs index ac030759a..a39e72eac 100644 --- a/TShockAPI/DB/IQueryBuilder.cs +++ b/TShockAPI/DB/IQueryBuilder.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/DB/ItemManager.cs b/TShockAPI/DB/ItemManager.cs index 712ec54ee..3777d8fd0 100755 --- a/TShockAPI/DB/ItemManager.cs +++ b/TShockAPI/DB/ItemManager.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/DB/ProjectileManager.cs b/TShockAPI/DB/ProjectileManager.cs index 94e8e1120..ec3f559e3 100755 --- a/TShockAPI/DB/ProjectileManager.cs +++ b/TShockAPI/DB/ProjectileManager.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/DB/RegionManager.cs b/TShockAPI/DB/RegionManager.cs index 8e3b46d33..625409c5c 100755 --- a/TShockAPI/DB/RegionManager.cs +++ b/TShockAPI/DB/RegionManager.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/DB/RememberedPosManager.cs b/TShockAPI/DB/RememberedPosManager.cs index 3700ceb84..44b21a5d9 100755 --- a/TShockAPI/DB/RememberedPosManager.cs +++ b/TShockAPI/DB/RememberedPosManager.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/DB/SqlColumn.cs b/TShockAPI/DB/SqlColumn.cs index 8fd72d885..0726e1601 100644 --- a/TShockAPI/DB/SqlColumn.cs +++ b/TShockAPI/DB/SqlColumn.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/DB/SqlTable.cs b/TShockAPI/DB/SqlTable.cs index 8a9a9c2d6..856f331fc 100755 --- a/TShockAPI/DB/SqlTable.cs +++ b/TShockAPI/DB/SqlTable.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/DB/SqlValue.cs b/TShockAPI/DB/SqlValue.cs index 9edb13e0f..0badb26d7 100644 --- a/TShockAPI/DB/SqlValue.cs +++ b/TShockAPI/DB/SqlValue.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/DB/TileManager.cs b/TShockAPI/DB/TileManager.cs index 0d4feee92..a5fdd680d 100755 --- a/TShockAPI/DB/TileManager.cs +++ b/TShockAPI/DB/TileManager.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/DB/UserManager.cs b/TShockAPI/DB/UserManager.cs index 4707f0231..e22efde81 100755 --- a/TShockAPI/DB/UserManager.cs +++ b/TShockAPI/DB/UserManager.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/DB/WarpsManager.cs b/TShockAPI/DB/WarpsManager.cs index 215726d63..cb8d1d022 100755 --- a/TShockAPI/DB/WarpsManager.cs +++ b/TShockAPI/DB/WarpsManager.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Extensions/DbExt.cs b/TShockAPI/Extensions/DbExt.cs index e7c20bf46..97e1d05b6 100644 --- a/TShockAPI/Extensions/DbExt.cs +++ b/TShockAPI/Extensions/DbExt.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Extensions/LinqExt.cs b/TShockAPI/Extensions/LinqExt.cs index e1885bbd5..589f3a774 100644 --- a/TShockAPI/Extensions/LinqExt.cs +++ b/TShockAPI/Extensions/LinqExt.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Extensions/RandomExt.cs b/TShockAPI/Extensions/RandomExt.cs index 42abce9a8..9e5f2552e 100644 --- a/TShockAPI/Extensions/RandomExt.cs +++ b/TShockAPI/Extensions/RandomExt.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Extensions/StringExt.cs b/TShockAPI/Extensions/StringExt.cs index fe6dcfa2a..0007d83fb 100644 --- a/TShockAPI/Extensions/StringExt.cs +++ b/TShockAPI/Extensions/StringExt.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/FileTools.cs b/TShockAPI/FileTools.cs index 4653e8968..f0d4b60e7 100644 --- a/TShockAPI/FileTools.cs +++ b/TShockAPI/FileTools.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/GeoIPCountry.cs b/TShockAPI/GeoIPCountry.cs index d18f35bd1..b820c5558 100644 --- a/TShockAPI/GeoIPCountry.cs +++ b/TShockAPI/GeoIPCountry.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index ef03f3734..84a10c21d 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 @@ -1741,6 +1741,25 @@ private static bool HandleSendTileSquare(GetDataHandlerArgs args) continue; } + // Fixes the Flower Boots not creating flowers issue + if (size == 1 && args.Player.Accessories.Any(i => i.active && i.netID == ItemID.FlowerBoots)) + { + if (Main.tile[realx, realy + 1].type == TileID.Grass && (newtile.Type == TileID.Plants || newtile.Type == TileID.Plants2)) + { + return false; + } + + if (Main.tile[realx, realy + 1].type == TileID.HallowedGrass && (newtile.Type == TileID.HallowedPlants || newtile.Type == TileID.HallowedPlants2)) + { + return false; + } + + if (Main.tile[realx, realy + 1].type == TileID.JungleGrass && newtile.Type == TileID.JunglePlants2) + { + return false; + } + } + // Junction Box if (tile.type == TileID.WirePipe) return false; diff --git a/TShockAPI/Group.cs b/TShockAPI/Group.cs index 3d709c397..f6c4a95b9 100644 --- a/TShockAPI/Group.cs +++ b/TShockAPI/Group.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/HandlerList.cs b/TShockAPI/HandlerList.cs index 07b9d5481..6990160d8 100644 --- a/TShockAPI/HandlerList.cs +++ b/TShockAPI/HandlerList.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Hooks/AccountHooks.cs b/TShockAPI/Hooks/AccountHooks.cs index 8c82d0ed0..c652e03ba 100755 --- a/TShockAPI/Hooks/AccountHooks.cs +++ b/TShockAPI/Hooks/AccountHooks.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Hooks/GeneralHooks.cs b/TShockAPI/Hooks/GeneralHooks.cs index d07c4f4fd..9e7a44093 100644 --- a/TShockAPI/Hooks/GeneralHooks.cs +++ b/TShockAPI/Hooks/GeneralHooks.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Hooks/PlayerHooks.cs b/TShockAPI/Hooks/PlayerHooks.cs index b3e6b585b..5d58847a7 100644 --- a/TShockAPI/Hooks/PlayerHooks.cs +++ b/TShockAPI/Hooks/PlayerHooks.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Hooks/RegionHooks.cs b/TShockAPI/Hooks/RegionHooks.cs index 26b2b9f88..2dabb0098 100644 --- a/TShockAPI/Hooks/RegionHooks.cs +++ b/TShockAPI/Hooks/RegionHooks.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/ILog.cs b/TShockAPI/ILog.cs index 21ad01562..881fad3fb 100644 --- a/TShockAPI/ILog.cs +++ b/TShockAPI/ILog.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/IPackable.cs b/TShockAPI/IPackable.cs index 7dbb2d938..017d62921 100644 --- a/TShockAPI/IPackable.cs +++ b/TShockAPI/IPackable.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Net/BaseMsg.cs b/TShockAPI/Net/BaseMsg.cs index 52d469b22..902feeff7 100644 --- a/TShockAPI/Net/BaseMsg.cs +++ b/TShockAPI/Net/BaseMsg.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Net/DisconnectMsg.cs b/TShockAPI/Net/DisconnectMsg.cs index 9e5789b46..3a2588988 100644 --- a/TShockAPI/Net/DisconnectMsg.cs +++ b/TShockAPI/Net/DisconnectMsg.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Net/NetTile.cs b/TShockAPI/Net/NetTile.cs index c3ee7d6f0..40a1a345c 100644 --- a/TShockAPI/Net/NetTile.cs +++ b/TShockAPI/Net/NetTile.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Net/ProjectileRemoveMsg.cs b/TShockAPI/Net/ProjectileRemoveMsg.cs index a576e5bdb..e3f2d13b5 100644 --- a/TShockAPI/Net/ProjectileRemoveMsg.cs +++ b/TShockAPI/Net/ProjectileRemoveMsg.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Net/SpawnMsg.cs b/TShockAPI/Net/SpawnMsg.cs index 2fa15e59b..cc6958d5e 100644 --- a/TShockAPI/Net/SpawnMsg.cs +++ b/TShockAPI/Net/SpawnMsg.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Net/WorldInfoMsg.cs b/TShockAPI/Net/WorldInfoMsg.cs index 5f2d83a1d..a14eb6a97 100644 --- a/TShockAPI/Net/WorldInfoMsg.cs +++ b/TShockAPI/Net/WorldInfoMsg.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/NetItem.cs b/TShockAPI/NetItem.cs index 3717674b9..fe3f00fe5 100644 --- a/TShockAPI/NetItem.cs +++ b/TShockAPI/NetItem.cs @@ -1,3 +1,21 @@ +/* +TShock, a server mod for Terraria +Copyright (C) 2011-2016 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 . +*/ + using System; using System.Collections.Generic; using System.Linq; diff --git a/TShockAPI/PacketBufferer.cs b/TShockAPI/PacketBufferer.cs index 66a8de140..3124c695d 100644 --- a/TShockAPI/PacketBufferer.cs +++ b/TShockAPI/PacketBufferer.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/PaginationTools.cs b/TShockAPI/PaginationTools.cs index 5e7d31d4a..880bb7db1 100644 --- a/TShockAPI/PaginationTools.cs +++ b/TShockAPI/PaginationTools.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Permissions.cs b/TShockAPI/Permissions.cs index e8c7d18df..35ac2b602 100644 --- a/TShockAPI/Permissions.cs +++ b/TShockAPI/Permissions.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 @@ -29,16 +29,16 @@ public static class Permissions { // tshock.account nodes - [Description("User can register account in game")] + [Description("User can register account in game.")] public static readonly string canregister = "tshock.account.register"; - [Description("User can login in game")] + [Description("User can login in game.")] public static readonly string canlogin = "tshock.account.login"; - [Description("User can logout in game")] + [Description("User can logout in game.")] public static readonly string canlogout = "tshock.account.logout"; - [Description("User can change password in game")] + [Description("User can change password in game.")] public static readonly string canchangepassword = "tshock.account.changepassword"; // tshock.admin nodes @@ -79,10 +79,10 @@ public static class Permissions [Description("User can manage regions.")] public static readonly string manageregion = "tshock.admin.region"; - [Description("User can mute and unmute users")] + [Description("User can mute and unmute users.")] public static readonly string mute = "tshock.admin.mute"; - [Description("User can see the id of players with /who")] + [Description("User can see the id of players with /who.")] public static readonly string seeids = "tshock.admin.seeplayerids"; [Description("User can save all the players SSI state.")] @@ -148,7 +148,7 @@ public static class Permissions [Description("Prevents your actions from being ignored if damage is too high.")] public static readonly string ignoredamagecap = "tshock.ignore.damage"; - [Description("Bypass server side character checks")] + [Description("Bypass server side character checks.")] public static readonly string bypassssc = "tshock.ignore.ssc"; [Description("Allow unrestricted SendTileSquare usage, for client side world editing.")] @@ -200,10 +200,10 @@ public static class Permissions [Description("User can kill all enemy npcs.")] public static readonly string butcher = "tshock.npc.butcher"; - [Description("User can summon bosses using items")] + [Description("User can summon bosses using items.")] public static readonly string summonboss = "tshock.npc.summonboss"; - [Description("User can start invasions (Goblin/Snow Legion) using items")] + [Description("User can start invasions (Goblin/Snow Legion) using items.")] public static readonly string startinvasion = "tshock.npc.startinvasion"; [Description("User can clear the list of users who have completed an angler quest that day.")] @@ -211,7 +211,8 @@ public static class Permissions // tshock.superadmin nodes - [Description("Meant for super admins only.")] + [Description("This permission is no longer used.")] + [Obsolete("No longer used.")] public static readonly string authverify = "tshock.superadmin.authverify"; [Description("Meant for super admins only.")] @@ -252,7 +253,7 @@ public static class Permissions [Description("User can use /spawn.")] public static readonly string spawn = "tshock.tp.spawn"; - [Description("User can use the Rod of Discor.")] + [Description("User can use the Rod of Discord.")] public static readonly string rod = "tshock.tp.rod"; [Description("User can use wormhole potions.")] @@ -287,7 +288,7 @@ public static class Permissions [Description("User can change the homes of NPCs.")] public static readonly string movenpc = "tshock.world.movenpc"; - [Description("User can convert hallow into corruption and vice-versa")] + [Description("User can convert hallow into corruption and vice-versa.")] public static readonly string converthardmode = "tshock.world.converthardmode"; [Description("User can force the server to Halloween mode.")] @@ -322,7 +323,7 @@ public static class Permissions [Description("User can modify the world.")] public static readonly string canbuild = "tshock.world.modify"; - + [Description("User can paint tiles.")] public static readonly string canpaint = "tshock.world.paint"; @@ -345,7 +346,7 @@ public static class Permissions [Description("User can kill others.")] public static readonly string kill = "tshock.kill"; - + [Description("Allows you to bypass the max slots for up to 5 slots above your max.")] public static readonly string reservedslot = "tshock.reservedslot"; @@ -364,10 +365,10 @@ public static class Permissions [Description("User can heal players.")] public static readonly string heal = "tshock.heal"; - [Description("User can use party chat in game")] + [Description("User can use party chat in game.")] public static readonly string canpartychat = "tshock.partychat"; - [Description("User can talk in third person")] + [Description("User can talk in third person.")] public static readonly string cantalkinthird = "tshock.thirdperson"; [Description("User can get the server info.")] @@ -376,10 +377,10 @@ public static class Permissions [Description("Player recovers health as damage is taken. Can be one shotted.")] public static readonly string godmode = "tshock.godmode"; - [Description("User can godmode other players")] + [Description("User can godmode other players.")] public static readonly string godmodeother = "tshock.godmode.other"; - [Description("Player can chat")] + [Description("Player can chat.")] public static readonly string canchat = "tshock.canchat"; [Description("Player can use banned projectiles.")] diff --git a/TShockAPI/PlayerData.cs b/TShockAPI/PlayerData.cs index 27baa3538..eff5baaa7 100644 --- a/TShockAPI/PlayerData.cs +++ b/TShockAPI/PlayerData.cs @@ -1,3 +1,21 @@ +/* +TShock, a server mod for Terraria +Copyright (C) 2011-2016 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 . +*/ + using Terraria; using TShockAPI; diff --git a/TShockAPI/Properties/AssemblyInfo.cs b/TShockAPI/Properties/AssemblyInfo.cs index 2dbae8e62..bf2ea2224 100755 --- a/TShockAPI/Properties/AssemblyInfo.cs +++ b/TShockAPI/Properties/AssemblyInfo.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 @@ -53,5 +53,5 @@ You should have received a copy of the GNU General Public License // 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.3.19")] -[assembly: AssemblyFileVersion("4.3.19")] +[assembly: AssemblyVersion("4.3.20")] +[assembly: AssemblyFileVersion("4.3.20")] diff --git a/TShockAPI/Rest/Rest.cs b/TShockAPI/Rest/Rest.cs index 77792f97e..1e87cc84b 100644 --- a/TShockAPI/Rest/Rest.cs +++ b/TShockAPI/Rest/Rest.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Rest/RestCommand.cs b/TShockAPI/Rest/RestCommand.cs index a4dcf9072..5327c1e3d 100644 --- a/TShockAPI/Rest/RestCommand.cs +++ b/TShockAPI/Rest/RestCommand.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Rest/RestManager.cs b/TShockAPI/Rest/RestManager.cs index cf10f1382..585f8e37d 100644 --- a/TShockAPI/Rest/RestManager.cs +++ b/TShockAPI/Rest/RestManager.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Rest/RestObject.cs b/TShockAPI/Rest/RestObject.cs index edc70f580..3653dfaa6 100644 --- a/TShockAPI/Rest/RestObject.cs +++ b/TShockAPI/Rest/RestObject.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Rest/RestPermissions.cs b/TShockAPI/Rest/RestPermissions.cs index 6f005c122..eb3bf6cde 100644 --- a/TShockAPI/Rest/RestPermissions.cs +++ b/TShockAPI/Rest/RestPermissions.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Rest/RestVerbs.cs b/TShockAPI/Rest/RestVerbs.cs index fa18aec78..057b7d2d6 100644 --- a/TShockAPI/Rest/RestVerbs.cs +++ b/TShockAPI/Rest/RestVerbs.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Rest/SecureRest.cs b/TShockAPI/Rest/SecureRest.cs index b0cc65c7d..f8290784f 100644 --- a/TShockAPI/Rest/SecureRest.cs +++ b/TShockAPI/Rest/SecureRest.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/SaveManager.cs b/TShockAPI/SaveManager.cs index 970f2b944..52c0d8372 100644 --- a/TShockAPI/SaveManager.cs +++ b/TShockAPI/SaveManager.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/ServerSideCharacters/ServerSideConfig.cs b/TShockAPI/ServerSideCharacters/ServerSideConfig.cs index 74587c086..1852b1917 100644 --- a/TShockAPI/ServerSideCharacters/ServerSideConfig.cs +++ b/TShockAPI/ServerSideCharacters/ServerSideConfig.cs @@ -1,9 +1,27 @@ +/* +TShock, a server mod for Terraria +Copyright (C) 2011-2016 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 . +*/ + using System; using System.Collections.Generic; using System.ComponentModel; /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/SqlLog.cs b/TShockAPI/SqlLog.cs index 083f76e7a..047f67c00 100644 --- a/TShockAPI/SqlLog.cs +++ b/TShockAPI/SqlLog.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/StatTracker.cs b/TShockAPI/StatTracker.cs old mode 100755 new mode 100644 index 62c112830..24913e839 --- a/TShockAPI/StatTracker.cs +++ b/TShockAPI/StatTracker.cs @@ -1,3 +1,21 @@ +/* +TShock, a server mod for Terraria +Copyright (C) 2011-2016 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 . +*/ + using System; using System.Collections.Generic; using System.Linq; diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs index 792a41608..fea1406c0 100755 --- a/TShockAPI/TSPlayer.cs +++ b/TShockAPI/TSPlayer.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/TSServerPlayer.cs b/TShockAPI/TSServerPlayer.cs index 7618e0ca4..a69a4ca23 100644 --- a/TShockAPI/TSServerPlayer.cs +++ b/TShockAPI/TSServerPlayer.cs @@ -1,3 +1,21 @@ +/* +TShock, a server mod for Terraria +Copyright (C) 2011-2016 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 . +*/ + using System; using System.Collections.Generic; using Terraria; diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 5e6720307..faaa624f7 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 @@ public class TShock : TerrariaPlugin /// CNMode - ʾǰ汾Ϣ. public static readonly string CNMode = "߼-"; /// CNVersion - ʾǰ汾. - public static readonly Version CNVersion = new Version(1, 4, 0, 0); + public static readonly Version CNVersion = new Version(1, 5, 0, 0); /// SavePath - This is the path TShock saves its data in. This path is relative to the TerrariaServer.exe (not in ServerPlugins). public static string SavePath = "tshock"; @@ -76,6 +76,9 @@ public class TShock : TerrariaPlugin /// internal static bool NoRestart; + /// Will be set to true once Utils.StopServer() is called. + public static bool ShuttingDown; + /// Players - Contains all TSPlayer objects for accessing TSPlayers currently on the server public static TSPlayer[] Players = new TSPlayer[Main.maxPlayers]; /// Bans - Static reference to the ban manager for accessing bans & related functions. @@ -795,36 +798,44 @@ public static void HandleCommandLinePostConfigLoad(string[] parms) private void OnPostInit(EventArgs args) { SetConsoleTitle(false); - if (!File.Exists(Path.Combine(SavePath, "auth.lck")) && !File.Exists(Path.Combine(SavePath, "authcode.txt"))) + + // Disable the auth system if "auth.lck" is present or a superadmin exists + if (File.Exists(Path.Combine(SavePath, "auth.lck")) || Users.GetUsers().Exists(u => u.Group == new SuperAdminGroup().Name)) + { + AuthToken = 0; + + if (File.Exists(Path.Combine(SavePath, "authcode.txt"))) + { + Log.ConsoleInfo("ݿдڳû, authcode.txt ɴ."); + Log.ConsoleInfo("ϵͳ֤ܲɾļ."); + File.Delete(Path.Combine(SavePath, "authcode.txt")); + } + + if (!File.Exists(Path.Combine(SavePath, "auth.lck"))) + { + // This avoids unnecessary database work, which can get ridiculously high on old servers as all users need to be fetched + File.Create(Path.Combine(SavePath, "auth.lck")); + } + } + else if (!File.Exists(Path.Combine(SavePath, "authcode.txt"))) { var r = new Random((int)DateTime.Now.ToBinary()); AuthToken = r.Next(100000, 10000000); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("ʾ: Ϸ\"{0}auth {1}\"() ɻȨ.", Commands.Specifier, AuthToken); - Console.WriteLine("ʱʾ. (ر: ִ\"{0}auth-verify\")", Commands.Specifier); - Console.ForegroundColor = ConsoleColor.Gray; - FileTools.CreateFile(Path.Combine(SavePath, "authcode.txt")); - using (var tw = new StreamWriter(Path.Combine(SavePath, "authcode.txt"))) - { - tw.WriteLine(AuthToken); - } + Console.WriteLine("ʱʾ, ֱ֤. ({0}auth)", Commands.Specifier); + Console.ResetColor(); + File.WriteAllText(Path.Combine(SavePath, "authcode.txt"), AuthToken.ToString()); } - else if (File.Exists(Path.Combine(SavePath, "authcode.txt"))) + else { - using (var tr = new StreamReader(Path.Combine(SavePath, "authcode.txt"))) - { - AuthToken = Convert.ToInt32(tr.ReadLine()); - } + AuthToken = Convert.ToInt32(File.ReadAllText(Path.Combine(SavePath, "authcode.txt"))); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine( "ʾ: ֤뽫 authcode.txt еֵ."); - Console.WriteLine("Ϸ\"{0}auth {1}\"() ɻȨ.",Commands.Specifier,AuthToken); - Console.WriteLine("ʱʾ. (ر: ִ\"{0}auth-verify\")",Commands.Specifier); - Console.ForegroundColor = ConsoleColor.Gray; - } - else - { - AuthToken = 0; + Console.WriteLine("Ϸ\"{0}auth {1}\"() ɻȨ.", Commands.Specifier, AuthToken); + Console.WriteLine("ʱʾ, ֱ֤. ({0}auth)", Commands.Specifier); + Console.ResetColor(); } Regions.Reload(); @@ -1200,6 +1211,13 @@ private void OnStatueSpawn(StatueSpawnEventArgs args) /// args - The ConnectEventArgs object. private void OnConnect(ConnectEventArgs args) { + if (ShuttingDown) + { + NetMessage.SendData((int)PacketTypes.Disconnect, args.Who, -1, "ڹر..."); + args.Handled = true; + return; + } + var player = new TSPlayer(args.Who); if (Utils.ActivePlayers() + 1 > Config.MaxSlots + Config.ReservedSlots) @@ -1383,7 +1401,13 @@ private void OnChat(ServerChatEventArgs args) { try { - args.Handled = Commands.HandleCommand(tsplr, args.Text); + args.Handled = true; + if (!Commands.HandleCommand(tsplr, args.Text)) + { + // This is required in case anyone makes HandleCommand return false again + tsplr.SendErrorMessage("޷ʶָ. ϵԱѰ."); + Log.ConsoleError("޷ʶָı '{0}' (: {1}).", args.Text, tsplr.Name); + } } catch (Exception ex) { diff --git a/TShockAPI/TShockAPI.licenseheader b/TShockAPI/TShockAPI.licenseheader index 936b8a9b5..96f5081fd 100644 --- a/TShockAPI/TShockAPI.licenseheader +++ b/TShockAPI/TShockAPI.licenseheader @@ -1,7 +1,7 @@ extensions: .cs /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/TextLog.cs b/TShockAPI/TextLog.cs index a6e7034af..c99775662 100644 --- a/TShockAPI/TextLog.cs +++ b/TShockAPI/TextLog.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/UpdateManager.cs b/TShockAPI/UpdateManager.cs index 605f76cf1..41ebbecff 100755 --- a/TShockAPI/UpdateManager.cs +++ b/TShockAPI/UpdateManager.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 diff --git a/TShockAPI/Utils.cs b/TShockAPI/Utils.cs index 4ebe29941..eeee3229b 100644 --- a/TShockAPI/Utils.cs +++ b/TShockAPI/Utils.cs @@ -1,6 +1,6 @@ /* TShock, a server mod for Terraria -Copyright (C) 2011-2015 Nyx Studios (fka. The TShock Team) +Copyright (C) 2011-2016 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 @@ -538,6 +538,8 @@ public void ForceKickAll(string reason) /// string reason (default: "服务器已关闭!") public void StopServer(bool save = true, string reason = "服务器已关闭!") { + TShock.ShuttingDown = true; + ForceKickAll(reason); if (save) SaveManager.Instance.SaveWorld(); diff --git a/TShockRestTestPlugin/Properties/AssemblyInfo.cs b/TShockRestTestPlugin/Properties/AssemblyInfo.cs index f9320bbe3..dfb6c9aa4 100644 --- a/TShockRestTestPlugin/Properties/AssemblyInfo.cs +++ b/TShockRestTestPlugin/Properties/AssemblyInfo.cs @@ -1,3 +1,21 @@ +/* +TShock, a server mod for Terraria +Copyright (C) 2011-2016 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 . +*/ + using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/TShockRestTestPlugin/TShockRestTestPlugin.cs b/TShockRestTestPlugin/TShockRestTestPlugin.cs index 385ba4fc2..250ff0879 100644 --- a/TShockRestTestPlugin/TShockRestTestPlugin.cs +++ b/TShockRestTestPlugin/TShockRestTestPlugin.cs @@ -1,3 +1,21 @@ +/* +TShock, a server mod for Terraria +Copyright (C) 2011-2016 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 . +*/ + using System; using System.Collections.Generic; using System.ComponentModel; diff --git a/TerrariaServerAPI b/TerrariaServerAPI index eb5261cc7..3c7a19d6e 160000 --- a/TerrariaServerAPI +++ b/TerrariaServerAPI @@ -1 +1 @@ -Subproject commit eb5261cc7dc51c1550558f7acd97687982d617ae +Subproject commit 3c7a19d6e5a3cdf3c82d12edca0f9e761e6f4a47 diff --git a/gpltext.py b/gpltext.py new file mode 100644 index 000000000..a9b54cafb --- /dev/null +++ b/gpltext.py @@ -0,0 +1,86 @@ +''' TShock, a server mod for Terraria +Copyright (C) 2011-2016 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 . +''' + +import re +import os +import glob + +extensions = {'.cs', '.py'} +path = "./" +pattern = "/\*\s?\n?TShock, a server mod for Terraria(\n|.)*\*/" +pypattern = "'''\s?\n?TShock, a server mod for Terraria(\n|.)*'''" +year = "2016" +filename = "./README.md" +text = "/*\n\ +TShock, a server mod for Terraria\n\ +Copyright (C) 2011-2016 Nyx Studios (fka. The TShock Team)\n\ +\n\ +This program is free software: you can redistribute it and/or modify\n\ +it under the terms of the GNU General Public License as published by\n\ +the Free Software Foundation, either version 3 of the License, or\n\ +(at your option) any later version.\n\ +\n\ +This program is distributed in the hope that it will be useful,\n\ +but WITHOUT ANY WARRANTY; without even the implied warranty of\n\ +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\ +GNU General Public License for more details.\n\ +\n\ +You should have received a copy of the GNU General Public License\n\ +along with this program. If not, see .\n\ +*/\n\ +\n\ +" +pytext = re.sub(r"\*/", "'''", text) +pytext = re.sub(r"/\*", "'''", pytext) + +def changeText(filename): + content = '' + + with open(filename, 'r') as f: + content = f.read() + + if filename.endswith('.py'): + if re.search(pypattern, content): + content = re.sub(r"Copyright \(C\) 2011-[\d]{4}", "Copyright (C) 2011-%s" % year, content) + else: + content = pytext + content + else: + if re.search(pattern, content): + content = re.sub(r"Copyright \(C\) 2011-[\d]{4}", "Copyright (C) 2011-%s" % year, content) + else: + content = text + content + + with open(filename, 'w') as f: + f.write(content) + +def getFiles(path): + list = os.listdir(path) + + for f in list: + #print (f) + if os.path.isdir(f): + getFiles(path + f + '/') + else: + for ext in extensions: + if f.endswith(ext): + if f.endswith('.Designer.cs'): + break + print (path + f) + changeText(path + f) + break + +getFiles(path) \ No newline at end of file diff --git a/scripts/create_release.py b/scripts/create_release.py index 1ce05309d..e63ee1b63 100644 --- a/scripts/create_release.py +++ b/scripts/create_release.py @@ -1,3 +1,21 @@ +''' +TShock, a server mod for Terraria +Copyright (C) 2011-2016 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 . +''' + # Hey there, this is used to compile TShock on the build server. # Don't change it. Thanks! @@ -92,24 +110,36 @@ def package_debug(): def delete_files(): os.chdir(release_dir) os.remove(mysql_bin_name) - os.remove(sqlite_bin_name) - os.remove(sqlite_dep) + # os.remove(sqlite_bin_name) + # os.remove(sqlite_dep) os.remove(json_bin_name) os.remove(bcrypt_bin_name) os.remove(http_bin_name) os.remove(geoip_db_name) os.chdir(cur_wd) +def upload_artifacts(): + if os.environ.get('TRAVIS_PULL_REQUEST', 'false') == 'false': + os.chdir(cur_wd) + os.mkdir(os.environ.get('TRAVIS_BRANCH', 'test-branch')) + os.chdir(os.environ.get('TRAVIS_BRANCH', 'test-branch')) + os.mkdir(os.environ.get('TRAVIS_BUILD_NUMBER', 'test-0407')) + os.chdir(cur_wd) + shutil.copy(os.path.join(release_dir, 'tshock_release.zip'), os.path.join(os.environ.get('TRAVIS_BRANCH', 'test-branch'), os.environ.get('TRAVIS_BUILD_NUMBER', 'test-0407'))) + shutil.copy(os.path.join(release_dir, 'tshock_debug.zip'), os.path.join(os.environ.get('TRAVIS_BRANCH', 'test-branch'), os.environ.get('TRAVIS_BUILD_NUMBER', 'test-0407'))) + decrypt_process = subprocess.Popen(['openssl', 'aes-256-cbc', '-K', os.environ.get('encrypted_1d7cd15ffdb4_key'), '-iv', os.environ.get('encrypted_1d7cd15ffdb4_iv'), '-in', './scripts/ssh_private_key.enc', '-out', './scripts/ssh_private_key', '-d']) + decrypt_process.wait() + os.chmod('./scripts/ssh_private_key', 0600) + upload_process = subprocess.Popen(['scp', '-oStrictHostKeyChecking=no', '-i', './scripts/ssh_private_key', '-r', os.environ.get('TRAVIS_BRANCH', 'test-branch'), 'tshock-travis@arc.shanked.me:/usr/share/nginx/tshock-travis/']) + upload_process.wait() + def update_terraria_source(): subprocess.check_call(['/usr/bin/git', 'submodule', 'init']) subprocess.check_call(['/usr/bin/git', 'submodule', 'update']) - subprocess.check_call(['/usr/bin/rm', '-rf', '/tmp/NuGet/']) - subprocess.check_call(['/usr/bin/rm', '-rf', '/tmp/NuGetScratch']) - subprocess.check_call(['/usr/bin/mono', '/opt/nuget/nuget.exe', 'restore']) def build_software(): - release_proc = subprocess.Popen(['/usr/local/bin/xbuild', './TShockAPI/TShockAPI.csproj', '/p:Configuration=Release']) - debug_proc = subprocess.Popen(['/usr/local/bin/xbuild', './TShockAPI/TShockAPI.csproj', '/p:Configuration=Debug']) + release_proc = subprocess.Popen(['xbuild', './TShockAPI/TShockAPI.csproj', '/p:Configuration=Release']) + debug_proc = subprocess.Popen(['xbuild', './TShockAPI/TShockAPI.csproj', '/p:Configuration=Debug']) release_proc.wait() debug_proc.wait() if (release_proc.returncode != 0): @@ -125,3 +155,4 @@ def build_software(): package_release() package_debug() delete_files() + upload_artifacts() diff --git a/scripts/deploy_release.py b/scripts/deploy_release.py index 5e2a90e1a..4b8067616 100644 --- a/scripts/deploy_release.py +++ b/scripts/deploy_release.py @@ -1,3 +1,21 @@ +''' +TShock, a server mod for Terraria +Copyright (C) 2011-2016 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 . +''' + import requests import json import sys diff --git a/scripts/ssh_private_key.enc b/scripts/ssh_private_key.enc new file mode 100644 index 000000000..69373269f Binary files /dev/null and b/scripts/ssh_private_key.enc differ diff --git a/scripts/test_release.py b/scripts/test_release.py index 53fb234ae..60009582b 100644 --- a/scripts/test_release.py +++ b/scripts/test_release.py @@ -1,3 +1,21 @@ +''' +TShock, a server mod for Terraria +Copyright (C) 2011-2016 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 . +''' + import subprocess import shutil import os.path