From 024fe5e6c52cda0c96e110d1232c2ba5a278ca79 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Fri, 16 Aug 2013 12:14:05 +0100 Subject: Added the removed plugins as submodules. --- .gitmodules | 6 ++++++ MCServer/Plugins/.gitignore | 2 -- MCServer/Plugins/Core | 1 + MCServer/Plugins/ProtectionAreas | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .gitmodules delete mode 100644 MCServer/Plugins/.gitignore create mode 160000 MCServer/Plugins/Core create mode 160000 MCServer/Plugins/ProtectionAreas diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..72bfa5600 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "MCServer/Plugins/Core"] + path = MCServer/Plugins/Core + url = git@github.com:mc-server/Core.git +[submodule "MCServer/Plugins/ProtectionAreas"] + path = MCServer/Plugins/ProtectionAreas + url = git@github.com:mc-server/ProtectionAreas.git diff --git a/MCServer/Plugins/.gitignore b/MCServer/Plugins/.gitignore deleted file mode 100644 index 010351de2..000000000 --- a/MCServer/Plugins/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -Core -ProtectionAreas \ No newline at end of file diff --git a/MCServer/Plugins/Core b/MCServer/Plugins/Core new file mode 160000 index 000000000..e3a45f343 --- /dev/null +++ b/MCServer/Plugins/Core @@ -0,0 +1 @@ +Subproject commit e3a45f34303331be77aceacf2ba53e503ad7284f diff --git a/MCServer/Plugins/ProtectionAreas b/MCServer/Plugins/ProtectionAreas new file mode 160000 index 000000000..3019c7b39 --- /dev/null +++ b/MCServer/Plugins/ProtectionAreas @@ -0,0 +1 @@ +Subproject commit 3019c7b396221b987cd3f89d422276f764834ffe -- cgit v1.2.3 From 1af758569df1125da13c15ecdda40028e76e9445 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Fri, 16 Aug 2013 12:17:31 +0100 Subject: Added transapi as a submodule - so it more accurately reflects the source origin. --- .gitmodules | 3 ++ MCServer/Plugins/TransAPI | 1 + MCServer/Plugins/TransAPI/LICENSE | 20 -------- MCServer/Plugins/TransAPI/README.md | 20 -------- MCServer/Plugins/TransAPI/main.lua | 91 ------------------------------------- 5 files changed, 4 insertions(+), 131 deletions(-) create mode 160000 MCServer/Plugins/TransAPI delete mode 100644 MCServer/Plugins/TransAPI/LICENSE delete mode 100644 MCServer/Plugins/TransAPI/README.md delete mode 100644 MCServer/Plugins/TransAPI/main.lua diff --git a/.gitmodules b/.gitmodules index 72bfa5600..088271457 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "MCServer/Plugins/ProtectionAreas"] path = MCServer/Plugins/ProtectionAreas url = git@github.com:mc-server/ProtectionAreas.git +[submodule "MCServer/Plugins/TransAPI"] + path = MCServer/Plugins/TransAPI + url = git@github.com:bearbin/transapi.git diff --git a/MCServer/Plugins/TransAPI b/MCServer/Plugins/TransAPI new file mode 160000 index 000000000..52e1de433 --- /dev/null +++ b/MCServer/Plugins/TransAPI @@ -0,0 +1 @@ +Subproject commit 52e1de4332a026e58fda843aae98c1f51e57199e diff --git a/MCServer/Plugins/TransAPI/LICENSE b/MCServer/Plugins/TransAPI/LICENSE deleted file mode 100644 index 102ed2a36..000000000 --- a/MCServer/Plugins/TransAPI/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Alexander Harkness - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/MCServer/Plugins/TransAPI/README.md b/MCServer/Plugins/TransAPI/README.md deleted file mode 100644 index b037a6732..000000000 --- a/MCServer/Plugins/TransAPI/README.md +++ /dev/null @@ -1,20 +0,0 @@ -TransAPI -======== - -A plugin translation API for MCServer. - -TransAPI is designed to be used with the [client library](https://github.com/bearbin/transapi-client), however there is also a stable API available for use. - -API ---- - - GetLanguage ( cPlayer ) - Returns the user's preferred language (or server default if not set). (ISO 639-1 language code) - - GetConsoleLanguage ( ) - Returns the preferred language for console text. (ISO 639-1 language code) - -Commands --------- - - * /language [lang] - Takes a language code (ISO 639-1) and sets the user's preferred language to that. (tranapi.setlang) diff --git a/MCServer/Plugins/TransAPI/main.lua b/MCServer/Plugins/TransAPI/main.lua deleted file mode 100644 index 2b6f77da6..000000000 --- a/MCServer/Plugins/TransAPI/main.lua +++ /dev/null @@ -1,91 +0,0 @@ --- This plugin copyright Alexander Harkness 2013, licensed under the MIT license. - --- Configuration -g_ServerLang = "en" -g_ConsoleLang = "en" - --- Global Variables -g_Plugin = nil -g_PluginManager = nil -g_PluginDir = nil -g_UserData = nil - --- START WITH DA AWESOME! -function Initialize( Plugin ) - - -- Set up the globals. - g_Plugin = Plugin - g_PluginManager = cRoot:Get():GetPluginManager() - g_PluginDir = Plugin:GetDirectory() - - -- Set up the plugin details. - Plugin:SetName( "TransAPI" ) - Plugin:SetVersion( 1 ) - - -- This is the place for commands! - g_PluginManager:BindCommand("/language", "transapi.setlang", HandleLanguageCommand, " - Set your preferred language (use ISO 639-1)") - - -- Load the userdata file. - g_UserData = cIniFile( g_PluginDir .. "/userdata.ini" ) - if g_UserData ~= true then - LOGERROR( "TransAPI INI file could not be opened!" ) - end - - LOG( "Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion() ) - - return true - -end - -function GetLanguage( Player ) - - -- Returns a language to use. - if g_UserData:ReadFile() == true then - local userLang = g_UserData:GetValueSet( Player:GetName(), "language", "false" ) - g_UserData:WriteFile() - end - - if userLang == "false" then - return g_ServerLang - else - return userLang - end - -end - -function GetConsoleLanguage() - -- Return the language to use for console messages. - return g_ConsoleLang -end - -function HandleLanguageCommand ( Split, Player ) - - -- If the user is not setting the language, tell them the currently selected one. - if #Split ~= 2 then - - local userLang = g_UserData:GetValueSet( Player:GetName(), "language", "false" ) - if userLang == "false" then - return g_ServerLang - else - return userLang - end - - end - - -- Set the language. - local success = g_UserData:SetValue( Player:GetName(), "language" Split[2] ) - g_UserData:WriteFile() - - if not success then - Player:SendMessage( "Language could not be set!" ) - else - Player:SendMessage( "Language set!" ) - end - - return true - -end - -function OnDisable() - LOG( "Disabled TransAPI!" ) -end -- cgit v1.2.3 From c3c3068fab8ce0f6e3674cf7e5d43f58c2a414b7 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Fri, 16 Aug 2013 12:43:56 +0100 Subject: Changed README so it knows about submodules --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 214279aff..e9b1f14e7 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ Installation To install MCServer, you can either download the repository and compile it, or download a pre-compiled version. +If you are cloning the repository, you are required to recursively download the submodules also with `git clone -r`. When pulling, you should use `git pull --recurse-submodules`. You might want to set the base forms as aliases to these. + Compilation instructions are available in the COMPILING file. Linux builds can be downloaded from [the Berboe CI server](http://ci.berboe.co.uk) and windows from xoft's [nightly build service](http://mc-server.xoft.cz). -- cgit v1.2.3 From 7e9957919edaba361b2bc3b054c37ee698646e5e Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Fri, 16 Aug 2013 12:44:38 +0100 Subject: Removed an old cloneplugins file. --- ClonePlugins.cmd | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 ClonePlugins.cmd diff --git a/ClonePlugins.cmd b/ClonePlugins.cmd deleted file mode 100644 index ad1fbe014..000000000 --- a/ClonePlugins.cmd +++ /dev/null @@ -1,7 +0,0 @@ - -:: ClonePlugins.cmd - -:: Clones the base plugins from their respective repos into proper folders (./MCServer/Plugins - -git clone https://github.com/mc-server/Core.git ./MCServer/Plugins/Core -git clone https://github.com/mc-server/ProtectionAreas.git ./MCServer/Plugins/ProtectionAreas \ No newline at end of file -- cgit v1.2.3