From 400a4d1083fa8ea29898a045ea1bb7815b3a4fcb Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 27 Sep 2014 15:33:35 +0100 Subject: Hopefully fix #1384 Can @madmaxoft comment? --- MCServer/Plugins/APIDump/Hooks/OnServerPing.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 MCServer/Plugins/APIDump/Hooks/OnServerPing.lua (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua new file mode 100644 index 000000000..8a710e047 --- /dev/null +++ b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua @@ -0,0 +1,24 @@ + (cClientHandle & a_ClientHandle, AString & a_ServerDescription, int & a_OnlinePlayersCount, int & a_MaxPlayersCount, AString & a_Favicon); + +return +{ + HOOK_SERVER_PING = + { + CalledWhen = "Client pings the server from the server list.", + DefaultFnName = "OnServerPing", -- also used as pagename + Desc = [[ + A plugin may implement an OnServerPing() function and register it as a Hook to process pings from + clients in the server server list. + ]], + Params = { + { Name = "ClientHandle", Type = "{{cClientHandle}}", Notes = "The client handle that pinged the server" }, + { Name = "ServerDescription", Type = "string", Notes = "The server description" }, + { Name = "OnlinePlayersCount", Type = "number", Notes = "The number of players currently on the server" }, + { Name = "MaxPlayersCount", Type = "number", Notes = "The current player cap for the server" }, + { Name = "Favicon", Type = "string", Notes = "The base64 encoded favicon to be displayed in the server list for compatible clients" }, + }, + Returns = [[ + The plugin may return a boolean of whether to respond to the client that pinged. + ]], + }, -- HOOK_SERVER_PING +} -- cgit v1.2.3 From 3ff7103440202694f36f4c5edd09f8c5d4abb5a5 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 27 Sep 2014 15:35:06 +0100 Subject: Remaining part of fix. --- MCServer/Plugins/APIDump/APIDesc.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index e6ee4ca10..6a3c178ef 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -1984,6 +1984,7 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage); HOOK_PLAYER_USING_ITEM = { Notes = "Called when the player is about to right-click with a usable item in their hand." }, HOOK_POST_CRAFTING = { Notes = "Called after a valid recipe has been chosen for the current contents of the crafting grid. Plugins may modify the recipe." }, HOOK_PRE_CRAFTING = { Notes = "Called before a recipe is searched for the current contents of the crafting grid. Plugins may provide a recipe and cancel the built-in search." }, + HOOK_SERVER_PING = { Notes = "Called when a alient pings the server from the server list." }, HOOK_SPAWNED_ENTITY = { Notes = "Called after an entity is spawned in a {{cWorld|world}}. The entity is already part of the world." }, HOOK_SPAWNED_MONSTER = { Notes = "Called after a mob is spawned in a {{cWorld|world}}. The mob is already part of the world." }, HOOK_SPAWNING_ENTITY = { Notes = "Called just before an entity is spawned in a {{cWorld|world}}." }, -- cgit v1.2.3 From 9dccbe7792cfdc6ffd56348aa9092004526b3794 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 27 Sep 2014 15:40:33 +0100 Subject: Fixed line left in. --- MCServer/Plugins/APIDump/Hooks/OnServerPing.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua index 8a710e047..7cfbd06ac 100644 --- a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua +++ b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua @@ -1,5 +1,3 @@ - (cClientHandle & a_ClientHandle, AString & a_ServerDescription, int & a_OnlinePlayersCount, int & a_MaxPlayersCount, AString & a_Favicon); - return { HOOK_SERVER_PING = @@ -8,7 +6,8 @@ return DefaultFnName = "OnServerPing", -- also used as pagename Desc = [[ A plugin may implement an OnServerPing() function and register it as a Hook to process pings from - clients in the server server list. + clients in the server server list. It can change the logged in players and player capacity, as well + as the server description and the favicon by editing the values passed in. ]], Params = { { Name = "ClientHandle", Type = "{{cClientHandle}}", Notes = "The client handle that pinged the server" }, @@ -18,7 +17,7 @@ return { Name = "Favicon", Type = "string", Notes = "The base64 encoded favicon to be displayed in the server list for compatible clients" }, }, Returns = [[ - The plugin may return a boolean of whether to respond to the client that pinged. + The plugin may return a boolean. ]], }, -- HOOK_SERVER_PING } -- cgit v1.2.3 From 5245bb0eba6450339c5294038e34a242638c461b Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 27 Sep 2014 16:44:11 +0100 Subject: Typo fix. --- MCServer/Plugins/APIDump/APIDesc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index 6a3c178ef..deaa28279 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -2815,7 +2815,7 @@ end Globals = { Desc = [[ - These functions are available directly, without a class instance. Any plugin cal call them at any + These functions are available directly, without a class instance. Any plugin can call them at any time. ]], Functions = -- cgit v1.2.3 From 990a467eb41c6fb1dc4a132bd6e990c97efaa2e6 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 27 Sep 2014 16:49:40 +0100 Subject: Fixed typo again. --- MCServer/Plugins/APIDump/APIDesc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index deaa28279..f903308d1 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -1984,7 +1984,7 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage); HOOK_PLAYER_USING_ITEM = { Notes = "Called when the player is about to right-click with a usable item in their hand." }, HOOK_POST_CRAFTING = { Notes = "Called after a valid recipe has been chosen for the current contents of the crafting grid. Plugins may modify the recipe." }, HOOK_PRE_CRAFTING = { Notes = "Called before a recipe is searched for the current contents of the crafting grid. Plugins may provide a recipe and cancel the built-in search." }, - HOOK_SERVER_PING = { Notes = "Called when a alient pings the server from the server list." }, + HOOK_SERVER_PING = { Notes = "Called when a client pings the server from the server list. Plugins may change the favicon, server description, players online and maximum players values." }, HOOK_SPAWNED_ENTITY = { Notes = "Called after an entity is spawned in a {{cWorld|world}}. The entity is already part of the world." }, HOOK_SPAWNED_MONSTER = { Notes = "Called after a mob is spawned in a {{cWorld|world}}. The mob is already part of the world." }, HOOK_SPAWNING_ENTITY = { Notes = "Called just before an entity is spawned in a {{cWorld|world}}." }, -- cgit v1.2.3 From 57e83f7d49485e254ab33ee348ce66c3981005a5 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 27 Sep 2014 21:27:48 +0100 Subject: Fixed return value descriptions. --- MCServer/Plugins/APIDump/Hooks/OnServerPing.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua index 7cfbd06ac..e4c8b054b 100644 --- a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua +++ b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua @@ -17,7 +17,9 @@ return { Name = "Favicon", Type = "string", Notes = "The base64 encoded favicon to be displayed in the server list for compatible clients" }, }, Returns = [[ - The plugin may return a boolean. + The plugin returns res, ServerDescription, OnlinePlayersCount, MaxPlayersCount, Favicon. + res is a boolean which stops other plugins being notified of the ping if it's set to true, and the others + are the same as the arguments, and if emitted change the values transmitted to the client. ]], }, -- HOOK_SERVER_PING } -- cgit v1.2.3 From e5873d4e890ab4c5cdff365790a368d99984944d Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 27 Sep 2014 21:28:59 +0100 Subject: Copy edit. --- MCServer/Plugins/APIDump/Hooks/OnServerPing.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua index e4c8b054b..2a6aaee27 100644 --- a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua +++ b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua @@ -7,7 +7,7 @@ return Desc = [[ A plugin may implement an OnServerPing() function and register it as a Hook to process pings from clients in the server server list. It can change the logged in players and player capacity, as well - as the server description and the favicon by editing the values passed in. + as the server description and the favicon, that are displayed to the client in the server list. ]], Params = { { Name = "ClientHandle", Type = "{{cClientHandle}}", Notes = "The client handle that pinged the server" }, -- cgit v1.2.3 From 24275e058b9e98d43c21d6754b29defc1cba28f6 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 27 Sep 2014 21:35:08 +0100 Subject: changed description to be more readable. --- MCServer/Plugins/APIDump/Hooks/OnServerPing.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua index 2a6aaee27..6dcaf3f17 100644 --- a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua +++ b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua @@ -17,9 +17,8 @@ return { Name = "Favicon", Type = "string", Notes = "The base64 encoded favicon to be displayed in the server list for compatible clients" }, }, Returns = [[ - The plugin returns res, ServerDescription, OnlinePlayersCount, MaxPlayersCount, Favicon. - res is a boolean which stops other plugins being notified of the ping if it's set to true, and the others - are the same as the arguments, and if emitted change the values transmitted to the client. + The plugin can return whether to continue processing of the hook with other plugins, the server description to + be displayed to the client, the currently online players, the player cap and the base64/png favicon data, in that order. ]], }, -- HOOK_SERVER_PING } -- cgit v1.2.3 From 4a4411d4d72efd13b38df813321565898d9da60f Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sun, 28 Sep 2014 09:28:51 +0100 Subject: Add Code example. --- MCServer/Plugins/APIDump/Hooks/OnServerPing.lua | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua index 6dcaf3f17..6d2325fe6 100644 --- a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua +++ b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua @@ -20,5 +20,31 @@ return The plugin can return whether to continue processing of the hook with other plugins, the server description to be displayed to the client, the currently online players, the player cap and the base64/png favicon data, in that order. ]], + CodeExamples = { + { + Title = "Change information returned to the player", + Desc = "Tells the client that the server description is 'test', there are one more players online than there actually are, and that the player cap is zero. It also changes the favicon data.", + Code = [[ +function OnServerPing(ClientHandle, ServerDescription, OnlinePlayers, MaxPlayers, Favicon) + -- Change Server Description + ServerDescription = "Test" + + -- Change online / max players + OnlinePlayers = OnlinePlayers + 1 + MaxPlayers = 0 + + -- Change favicon + if (cFile:IsFile("my-favicon.png")) then + local FaviconData = cFile:ReadWholeFile("my-favicon.png") + if (FaviconData != "") then + Favicon = Base64Encode(FaviconData) + end + end + + return false, ServerDescription, OnlinePlayers, MaxPlayers, Favicon +end + ]], + }, + }, }, -- HOOK_SERVER_PING } -- cgit v1.2.3 From 27331da017625c748a104c72d72c8958003e1e90 Mon Sep 17 00:00:00 2001 From: Howaner Date: Sun, 28 Sep 2014 11:17:36 +0200 Subject: Updated api documentation. --- MCServer/Plugins/APIDump/APIDesc.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index e6ee4ca10..fbed7cc00 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -2035,6 +2035,7 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage); AddRank = { Params = "RankName, MsgPrefix, MsgSuffix, MsgNameColorCode", Return = "", Notes = "Adds a new rank of the specified name and with the specified message visuals. Logs an info message and does nothing if the rank already exists." }, GetAllGroups = { Params = "", Return = "array-table of groups' names", Notes = "Returns an array-table containing the names of all the groups that are known to the manager." }, GetAllPermissions = { Params = "", Return = "array-table of permissions", Notes = "Returns an array-table containing all the permissions that are known to the manager." }, + GetAllPlayers = { Params = "", Return = "array-table of playernames", Notes = "Returns the short uuids of all defined players." }, GetAllRanks = { Params = "", Return = "array-table of ranks' names", Notes = "Returns an array-table containing the names of all the ranks that are known to the manager." }, GetDefaultRank = { Params = "", Return = "string", Notes = "Returns the name of the default rank. " }, GetGroupPermissions = { Params = "GroupName", Return = "array-table of permissions", Notes = "Returns an array-table containing the permissions that the specified group contains." }, @@ -2042,6 +2043,7 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage); GetPlayerMsgVisuals = { Params = "PlayerUUID", Return = "MsgPrefix, MsgSuffix, MsgNameColorCode", Notes = "Returns the message visuals assigned to the player. If the player is not explicitly assigned a rank, the default rank's visuals are returned. If there is an error, no value is returned at all." }, GetPlayerPermissions = { Params = "PlayerUUID", Return = "array-table of permissions", Notes = "Returns the permissions that the specified player is assigned through their rank. Returns the default rank's permissions if the player has no explicit rank assigned to them. Returns an empty array on error." }, GetPlayerRankName = { Params = "PlayerUUID", Return = "RankName", Notes = "Returns the name of the rank that is assigned to the specified player. An empty string (NOT the default rank) is returned if the player has no rank assigned to them." }, + GetPlayerName = { Params = "PlayerUUID", Return = "PlayerName", Notes = "Returns the last name that the specified player has. If the player isn't in the database, An empty string is returned if the player isn't in the database." }, GetRankGroups = { Params = "RankName", Return = "array-table of groups' names", Notes = "Returns an array-table of the names of all the groups that are assigned to the specified rank. Returns an empty table if there is no such rank." }, GetRankPermissions = { Params = "RankName", Return = "array-table of permissions", Notes = "Returns an array-table of all the permissions that are assigned to the specified rank through its groups. Returns an empty table if there is no such rank." }, GetRankVisuals = { Params = "RankName", Return = "MsgPrefix, MsgSuffix, MsgNameColorCode", Notes = "Returns the message visuals for the specified rank. Returns no value if the specified rank does not exist." }, -- cgit v1.2.3 From 63c53a8e23776cc3011fd0260857bd22274e2c62 Mon Sep 17 00:00:00 2001 From: Howaner Date: Sun, 28 Sep 2014 15:16:11 +0200 Subject: cRankManager: Added ClearPlayerRanks() --- MCServer/Plugins/APIDump/APIDesc.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index fbed7cc00..2250092ba 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -2033,6 +2033,7 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage); AddGroupToRank = { Params = "GroupName, RankName", Return = "bool", Notes = "Adds the specified group to the specified rank. Returns true on success, false on failure - if the group name or the rank name is not found." }, AddPermissionToGroup = { Params = "Permission, GroupName", Return = "bool", Notes = "Adds the specified permission to the specified group. Returns true on success, false on failure - if the group name is not found." }, AddRank = { Params = "RankName, MsgPrefix, MsgSuffix, MsgNameColorCode", Return = "", Notes = "Adds a new rank of the specified name and with the specified message visuals. Logs an info message and does nothing if the rank already exists." }, + ClearPlayerRanks = { Params = "", Return = "", Notes = "Removes all player ranks from the database. Note that this doesn't change the cPlayer instances for the already connected players, you need to update all the instances manually." }, GetAllGroups = { Params = "", Return = "array-table of groups' names", Notes = "Returns an array-table containing the names of all the groups that are known to the manager." }, GetAllPermissions = { Params = "", Return = "array-table of permissions", Notes = "Returns an array-table containing all the permissions that are known to the manager." }, GetAllPlayers = { Params = "", Return = "array-table of playernames", Notes = "Returns the short uuids of all defined players." }, -- cgit v1.2.3 From 3c6ce77934c83972a1ea9c6f9e7cf6af0e44d8c9 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 29 Sep 2014 20:39:09 +0200 Subject: Fixed a typo in the description. --- MCServer/Plugins/APIDump/APIDesc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index 6c13597f4..eace16c96 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -2045,7 +2045,7 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage); GetPlayerMsgVisuals = { Params = "PlayerUUID", Return = "MsgPrefix, MsgSuffix, MsgNameColorCode", Notes = "Returns the message visuals assigned to the player. If the player is not explicitly assigned a rank, the default rank's visuals are returned. If there is an error, no value is returned at all." }, GetPlayerPermissions = { Params = "PlayerUUID", Return = "array-table of permissions", Notes = "Returns the permissions that the specified player is assigned through their rank. Returns the default rank's permissions if the player has no explicit rank assigned to them. Returns an empty array on error." }, GetPlayerRankName = { Params = "PlayerUUID", Return = "RankName", Notes = "Returns the name of the rank that is assigned to the specified player. An empty string (NOT the default rank) is returned if the player has no rank assigned to them." }, - GetPlayerName = { Params = "PlayerUUID", Return = "PlayerName", Notes = "Returns the last name that the specified player has. If the player isn't in the database, An empty string is returned if the player isn't in the database." }, + GetPlayerName = { Params = "PlayerUUID", Return = "PlayerName", Notes = "Returns the last name that the specified player has, for a player in the ranks database. An empty string is returned if the player isn't in the database." }, GetRankGroups = { Params = "RankName", Return = "array-table of groups' names", Notes = "Returns an array-table of the names of all the groups that are assigned to the specified rank. Returns an empty table if there is no such rank." }, GetRankPermissions = { Params = "RankName", Return = "array-table of permissions", Notes = "Returns an array-table of all the permissions that are assigned to the specified rank through its groups. Returns an empty table if there is no such rank." }, GetRankVisuals = { Params = "RankName", Return = "MsgPrefix, MsgSuffix, MsgNameColorCode", Notes = "Returns the message visuals for the specified rank. Returns no value if the specified rank does not exist." }, -- cgit v1.2.3 From 7a8ca26052f37d9e766f7f40ecff867aadfbbd2c Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 29 Sep 2014 21:46:38 +0200 Subject: Updated the Core. --- MCServer/Plugins/Core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/Core b/MCServer/Plugins/Core index 9de860603..4fc575c05 160000 --- a/MCServer/Plugins/Core +++ b/MCServer/Plugins/Core @@ -1 +1 @@ -Subproject commit 9de86060388b515642c55d58b44b4281285efc00 +Subproject commit 4fc575c0567a570618cea09caa47fb5bcde6d5b9 -- cgit v1.2.3 From 33dc66a4d23246b5794cf9ca5bd4287a72db4cec Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 29 Sep 2014 22:00:14 +0200 Subject: RankMgr: GetAllPlayers() returns players sorted by name. --- MCServer/Plugins/APIDump/APIDesc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index eace16c96..9bc6299d9 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -2037,7 +2037,7 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage); ClearPlayerRanks = { Params = "", Return = "", Notes = "Removes all player ranks from the database. Note that this doesn't change the cPlayer instances for the already connected players, you need to update all the instances manually." }, GetAllGroups = { Params = "", Return = "array-table of groups' names", Notes = "Returns an array-table containing the names of all the groups that are known to the manager." }, GetAllPermissions = { Params = "", Return = "array-table of permissions", Notes = "Returns an array-table containing all the permissions that are known to the manager." }, - GetAllPlayers = { Params = "", Return = "array-table of playernames", Notes = "Returns the short uuids of all defined players." }, + GetAllPlayers = { Params = "", Return = "array-table of uuids", Notes = "Returns the short uuids of all defined players, sorted by the players' names (case insensitive)." }, GetAllRanks = { Params = "", Return = "array-table of ranks' names", Notes = "Returns an array-table containing the names of all the ranks that are known to the manager." }, GetDefaultRank = { Params = "", Return = "string", Notes = "Returns the name of the default rank. " }, GetGroupPermissions = { Params = "GroupName", Return = "array-table of permissions", Notes = "Returns an array-table containing the permissions that the specified group contains." }, -- cgit v1.2.3 From cba871fd872cd49eb668e785e4525234d90089e3 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 29 Sep 2014 22:00:36 +0200 Subject: Updated Core. --- MCServer/Plugins/Core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/Core b/MCServer/Plugins/Core index 4fc575c05..0e4556798 160000 --- a/MCServer/Plugins/Core +++ b/MCServer/Plugins/Core @@ -1 +1 @@ -Subproject commit 4fc575c0567a570618cea09caa47fb5bcde6d5b9 +Subproject commit 0e455679821740a8d7c316340f4ed5d21e011172 -- cgit v1.2.3 From 46d3d4049364fc13a536396571bef2484d842315 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 29 Sep 2014 22:12:33 +0200 Subject: Updated Core. --- MCServer/Plugins/Core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/Core b/MCServer/Plugins/Core index 0e4556798..3a0e0597b 160000 --- a/MCServer/Plugins/Core +++ b/MCServer/Plugins/Core @@ -1 +1 @@ -Subproject commit 0e455679821740a8d7c316340f4ed5d21e011172 +Subproject commit 3a0e0597b7a24c44bf87ec90beb9be48d0b99709 -- cgit v1.2.3 From f2f0c26421e47ab815b25e7971e49a47f4ae1629 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 1 Oct 2014 12:14:51 +0200 Subject: APIDump: Added missing cClientHandle documentation. --- MCServer/Plugins/APIDump/APIDesc.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index 9bc6299d9..4865fb293 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -540,6 +540,9 @@ end SetUsername = { Params = "Name", Return = "", Notes = "Sets the username" }, SetViewDistance = { Params = "ViewDistance", Return = "", Notes = "Sets the viewdistance (number of chunks loaded for the player in each direction)" }, SendBlockChange = { Params = "BlockX, BlockY, BlockZ, BlockType, BlockMeta", Return = "", Notes = "Sends a BlockChange packet to the client. This can be used to create fake blocks only for that player." }, + SendEntityAnimation = { Params = "{{cEntity|Entity}}, AnimationNumber", Return = "", Notes = "Sends the specified animation of the specified entity to the client. The AnimationNumber is protocol-specific." }, + SendSoundEffect = { Params = "SoundName, X, Y, Z, Volume, Pitch", Return = "", Notes = "Sends a sound effect request to the client. The sound is played at the specified coords, with the specified volume (a float, 1.0 is full volume, can be more) and pitch (0-255, 63 is 100%)" }, + SendTimeUpdate = { Params = "WorldAge, TimeOfDay, DoDaylightCycle", Return = "", Notes = "Sends the specified time update to the client. WorldAge is the total age of the world, in ticks. TimeOfDay is the current day's time, in ticks (0 - 24000). DoDaylightCycle is a bool that specifies whether the client should automatically move the sun (true) or keep it in the same place (false)." }, }, Constants = { -- cgit v1.2.3 From a8f29097de5857f0b3530d365bb8f02aed5bac78 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 1 Oct 2014 12:24:09 +0200 Subject: APIDump: Documented missing cCompositeChat functions. --- MCServer/Plugins/APIDump/APIDesc.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index 4865fb293..2d6a8a73c 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -558,9 +558,9 @@ end and commands suggested on click. The chat message can be sent by the regular chat-sending functions, {{cPlayer}}:SendMessage(), {{cWorld}}:BroadcastChat() and {{cRoot}}:BroadcastChat().

- Note that most of the functions in this class are so-called modifiers - they modify the object and - then return the object itself, so that they can be chained one after another. See the Chaining - example below for details.

+ Note that most of the functions in this class are so-called chaining modifiers - they modify the + object and then return the object itself, so that they can be chained one after another. See the + Chaining example below for details.

Each part of the composite chat message takes a "Style" parameter, this is a string that describes the formatting. It uses the following strings, concatenated together: @@ -584,14 +584,16 @@ end { Params = "Text", Return = "", Notes = "Creates a chat message containing the specified text, parsed by the ParseText() function. This allows easy migration from old chat messages." }, }, AddRunCommandPart = { Params = "Text, Command, [Style]", Return = "self", Notes = "Adds a text which, when clicked, runs the specified command. Chaining." }, + AddShowAchievementPart = { Params = "PlayerName, AchievementName, [Style]", Return = "", Notes = "Adds a text that represents the 'Achievement get' message." }, AddSuggestCommandPart = { Params = "Text, Command, [Style]", Return = "self", Notes = "Adds a text which, when clicked, puts the specified command into the player's chat input area. Chaining." }, AddTextPart = { Params = "Text, [Style]", Return = "self", Notes = "Adds a regular text. Chaining." }, AddUrlPart = { Params = "Text, Url, [Style]", Return = "self", Notes = "Adds a text which, when clicked, opens up a browser at the specified URL. Chaining." }, Clear = { Params = "", Return = "", Notes = "Removes all parts from this object" }, ExtractText = { Params = "", Return = "string", Notes = "Returns the text from the parts that comprises the human-readable data. Used for older protocols that don't support composite chat and for console-logging." }, + GetAdditionalMessageTypeData = { Params = "", Return = "string", Notes = "Returns the AdditionalData associated with the message, such as the sender's name for mtPrivateMessage" }, GetMessageType = { Params = "", Return = "MessageType", Notes = "Returns the MessageType (mtXXX constant) that is associated with this message. When sent to a player, the message will be formatted according to this message type and the player's settings (adding \"[INFO]\" prefix etc.)" }, ParseText = { Params = "Text", Return = "self", Notes = "Adds text, while recognizing http and https URLs and old-style formatting codes (\"@2\"). Chaining." }, - SetMessageType = { Params = "MessageType", Return = "self", Notes = "Sets the MessageType (mtXXX constant) that is associated with this message. When sent to a player, the message will be formatted according to this message type and the player's settings (adding \"[INFO]\" prefix etc.) Chaining." }, + SetMessageType = { Params = "MessageType, AdditionalData", Return = "self", Notes = "Sets the MessageType (mtXXX constant) that is associated with this message. Also sets the additional data (string) associated with the message, which is specific for the message type - such as the sender's name for mtPrivateMessage. When sent to a player, the message will be formatted according to this message type and the player's settings (adding \"[INFO]\" prefix etc.). Chaining." }, UnderlineUrls = { Params = "", Return = "self", Notes = "Makes all URL parts contained in the message underlined. Doesn't affect parts added in the future. Chaining." }, }, -- cgit v1.2.3 From 196f09d4bcabd4dffb740d7d538e8c2ebfe67feb Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 1 Oct 2014 12:24:37 +0200 Subject: APIDump: Documented missing cIniFile function. --- MCServer/Plugins/APIDump/APIDesc.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index 2d6a8a73c..db6651707 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -1048,6 +1048,7 @@ ValueName0=SomeOtherValue GetValueSetB = { Params = "KeyName, ValueName, Default", Return = "bool", Notes = "Returns the value of the specified name under the specified key, as a bool. If the value doesn't exist, creates it with the specified default." }, GetValueSetF = { Params = "KeyName, ValueName, Default", Return = "number", Notes = "Returns the value of the specified name under the specified key, as a floating-point number. If the value doesn't exist, creates it with the specified default." }, GetValueSetI = { Params = "KeyName, ValueName, Default", Return = "number", Notes = "Returns the value of the specified name under the specified key, as an integer. If the value doesn't exist, creates it with the specified default." }, + HasValue = { Params = "KeyName, ValueName", Return = "bool", Notes = "Returns true if the specified value is present." }, ReadFile = { Params = "FileName, [AllowExampleFallback]", Return = "bool", Notes = "Reads the values from the specified file. Previous in-memory contents are lost. If the file cannot be opened, and AllowExample is true, another file, \"filename.example.ini\", is loaded and then saved as \"filename.ini\". Returns true if successful, false if not." }, SetValue = { -- cgit v1.2.3 From 901bed39895be35ceb66352f8120b8117f44fb4e Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 1 Oct 2014 12:44:28 +0200 Subject: Unified cRoot broadcast chat documentation. --- MCServer/Plugins/APIDump/APIDesc.lua | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index db6651707..b7f3e3e07 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -2086,13 +2086,20 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage); ]], Functions = { - BroadcastChat = { Params = "Message", Return = "", Notes = "Broadcasts a message to every player in the server. No formatting is done by the server." }, - BroadcastChatFailure = { Params = "Message", Return = "", Notes = "Prepends Rose [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For a command that failed to run because of insufficient permissions, etc." }, - BroadcastChatFatal = { Params = "Message", Return = "", Notes = "Prepends Red [FATAL] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For a plugin that crashed, or similar." }, - BroadcastChatInfo = { Params = "Message", Return = "", Notes = "Prepends Yellow [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For informational messages, such as command usage." }, - BroadcastChatSuccess = { Params = "Message", Return = "", Notes = "Prepends Green [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For success messages." }, - BroadcastChatWarning = { Params = "Message", Return = "", Notes = "Prepends Rose [WARN] / colours entire text (depending on ShouldUseChatPrefixes()) and broadcasts message. For concerning events, such as plugin reload etc." }, - CreateAndInitializeWorld = { Params = "WorldName", Return = "{{cWorld|cWorld}}", Notes = "Creates a new world and initializes it. If there is a world whith the same name it returns nil." }, + BroadcastChat = + { + { Params = "MessageText, MessageType", Return = "", Notes = "Broadcasts a message to all players, with its message type set to MessageType (default: mtCustom)." }, + { Params = "{{cCompositeChat|CompositeChat}}", Return = "", Notes = "Broadcasts a {{cCompositeChat|composite chat message} to all players." }, + }, + BroadcastChatDeath = { Params = "MessageText", Return = "", Notes = "Broadcasts the specified message to all players, with its message type set to mtDeath. Use for when a player has died." }, + BroadcastChatFailure = { Params = "MessageText", Return = "", Notes = "Broadcasts the specified message to all players, with its message type set to mtFailure. Use for a command that failed to run because of insufficient permissions, etc." }, + BroadcastChatFatal = { Params = "MessageText", Return = "", Notes = "Broadcasts the specified message to all players, with its message type set to mtFatal. Use for a plugin that crashed, or similar." }, + BroadcastChatInfo = { Params = "MessageText", Return = "", Notes = "Broadcasts the specified message to all players, with its message type set to mtInfo. Use for informational messages, such as command usage." }, + BroadcastChatJoin = { Params = "MessageText", Return = "", Notes = "Broadcasts the specified message to all players, with its message type set to mtJoin. Use for players joining the server." }, + BroadcastChatLeave = { Params = "MessageText", Return = "", Notes = "Broadcasts the specified message to all players, with its message type set to mtLeave. Use for players leaving the server." }, + BroadcastChatSuccess = { Params = "MessageText", Return = "", Notes = "Broadcasts the specified message to all players, with its message type set to mtSuccess. Use for success messages." }, + BroadcastChatWarning = { Params = "MessageText", Return = "", Notes = "Broadcasts the specified message to all players, with its message type set to mtWarning. Use for concerning events, such as plugin reload etc." }, + CreateAndInitializeWorld = { Params = "WorldName", Return = "{{cWorld|cWorld}}", Notes = "Creates a new world and initializes it. If there is a world whith the same name it returns nil.

NOTEThis function is currently unsafe, do not use!" }, FindAndDoWithPlayer = { Params = "PlayerName, CallbackFunction", Return = "", Notes = "Calls the given callback function for all players with names partially (or fully) matching the name string provided." }, ForEachPlayer = { Params = "CallbackFunction", Return = "", Notes = "Calls the given callback function for each player. The callback function has the following signature:

function Callback({{cPlayer|cPlayer}})
" }, ForEachWorld = { Params = "CallbackFunction", Return = "", Notes = "Calls the given callback function for each world. The callback function has the following signature:
function Callback({{cWorld|cWorld}})
" }, -- cgit v1.2.3 From ac0b3168a1dc4bb80499875375c458033423e35e Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 1 Oct 2014 17:29:28 +0200 Subject: APIDump: Added more of the missing documentation. --- MCServer/Plugins/APIDump/APIDesc.lua | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index b7f3e3e07..2f1c766cb 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -524,6 +524,7 @@ end Functions = { GenerateOfflineUUID = { Params = "Username", Return = "string", Notes = "(STATIC) Generates an UUID based on the player name provided. This is used for the offline (non-auth) mode, when there's no UUID source. Each username generates a unique and constant UUID, so that when the player reconnects with the same name, their UUID is the same. Returns a 32-char UUID (no dashes)." }, + GetClientBrand = { Params = "", Return = "string", Notes = "Returns the brand that the client has sent in their MC|Brand plugin message." }, GetIPString = { Params = "", Return = "string", Notes = "Returns the IP address of the connection, as a string. Only the address part is returned, without the port number." }, GetLocale = { Params = "", Return = "Locale", Notes = "Returns the locale string that the client sends as part of the protocol handshake. Can be used to provide localized strings." }, GetPing = { Params = "", Return = "number", Notes = "Returns the ping time, in ms" }, @@ -536,6 +537,7 @@ end IsUUIDOnline = { Params = "UUID", Return = "bool", Notes = "(STATIC) Returns true if the UUID is generated by online auth, false if it is an offline-generated UUID. We use Version-3 UUIDs for offline UUIDs, online UUIDs are Version-4, thus we can tell them apart. Accepts both 32-char and 36-char UUIDs (with and without dashes). If the string given is not a valid UUID, returns false."}, Kick = { Params = "Reason", Return = "", Notes = "Kicks the user with the specified reason" }, SendPluginMessage = { Params = "Channel, Message", Return = "", Notes = "Sends the plugin message on the specified channel." }, + SetClientBrand = { Params = "ClientBrand", Return = "", Notes = "Sets the value of the client's brand. Normally this value is received from the client by a MC|Brand plugin message, this function lets plugins overwrite the value." }, SetLocale = { Params = "Locale", Return = "", Notes = "Sets the locale that MCServer keeps on record. Initially the locale is initialized in protocol handshake, this function allows plugins to override the stored value (but only server-side and only until the user disconnects)." }, SetUsername = { Params = "Name", Return = "", Notes = "Sets the username" }, SetViewDistance = { Params = "ViewDistance", Return = "", Notes = "Sets the viewdistance (number of chunks loaded for the player in each direction)" }, @@ -589,6 +591,7 @@ end AddTextPart = { Params = "Text, [Style]", Return = "self", Notes = "Adds a regular text. Chaining." }, AddUrlPart = { Params = "Text, Url, [Style]", Return = "self", Notes = "Adds a text which, when clicked, opens up a browser at the specified URL. Chaining." }, Clear = { Params = "", Return = "", Notes = "Removes all parts from this object" }, + CreateJsonString = { Params = "[AddPrefixes]", Return = "string", Notes = "Returns the entire object serialized into JSON, as it would be sent to a client. AddPrefixes specifies whether the chat prefixes should be prepended to the message, true by default." }, ExtractText = { Params = "", Return = "string", Notes = "Returns the text from the parts that comprises the human-readable data. Used for older protocols that don't support composite chat and for console-logging." }, GetAdditionalMessageTypeData = { Params = "", Return = "string", Notes = "Returns the AdditionalData associated with the message, such as the sender's name for mtPrivateMessage" }, GetMessageType = { Params = "", Return = "MessageType", Notes = "Returns the MessageType (mtXXX constant) that is associated with this message. When sent to a player, the message will be formatted according to this message type and the player's settings (adding \"[INFO]\" prefix etc.)" }, @@ -1746,6 +1749,7 @@ a_Player:OpenWindow(Window); GetItem = { Params = "", Return = "{{cItem|cItem}}", Notes = "Returns the item represented by this pickup" }, IsCollected = { Params = "", Return = "bool", Notes = "Returns true if this pickup has already been collected (is waiting to be destroyed)" }, IsPlayerCreated = { Params = "", Return = "bool", Notes = "Returns true if the pickup was created by a player" }, + SetAge = { Params = "AgeTicks", Return = "", Notes = "Sets the pickup's age, in ticks." }, }, Inherits = "cEntity", }, -- cPickup @@ -1770,8 +1774,8 @@ a_Player:OpenWindow(Window); ForceSetSpeed = { Params = "{{Vector3d|Direction}}", Notes = "Forces the player to move to the given direction." }, GetClientHandle = { Params = "", Return = "{{cClientHandle}}", Notes = "Returns the client handle representing the player's connection. May be nil (AI players)." }, GetColor = { Return = "string", Notes = "Returns the full color code to be used for this player's messages (based on their rank). Prefix player messages with this code." }, - GetPlayerListName = { Return = "string", Notes = "Returns the name that is used in the playerlist." }, GetCurrentXp = { Params = "", Return = "number", Notes = "Returns the current amount of XP" }, + GetCustomName = { Params = "", Return = "string", Notes = "Returns the custom name of this player. If the player hasn't a custom name, it will return an empty string." }, GetEffectiveGameMode = { Params = "", Return = "{{Globals#GameMode|GameMode}}", Notes = "(OBSOLETE) Returns the current resolved game mode of the player. If the player is set to inherit the world's gamemode, returns that instead. See also GetGameMode() and IsGameModeXXX() functions. Note that this function is the same as GetGameMode(), use that function instead." }, GetEquippedItem = { Params = "", Return = "{{cItem}}", Notes = "Returns the item that the player is currently holding; empty item if holding nothing." }, GetEyeHeight = { Return = "number", Notes = "Returns the height of the player's eyes, in absolute coords" }, @@ -1786,18 +1790,24 @@ a_Player:OpenWindow(Window); GetGameMode = { Return = "{{Globals#GameMode|GameMode}}", Notes = "Returns the player's gamemode. The player may have their gamemode unassigned, in which case they inherit the gamemode from the current {{cWorld|world}}.
NOTE: Instead of comparing the value returned by this function to the gmXXX constants, use the IsGameModeXXX() functions. These functions handle the gamemode inheritance automatically."}, GetIP = { Return = "string", Notes = "Returns the IP address of the player, if available. Returns an empty string if there's no IP to report."}, GetInventory = { Return = "{{cInventory|Inventory}}", Notes = "Returns the player's inventory"}, + GetLastBedPos = { Params = "", Return = "{{Vector3i}}", Notes = "Returns the position of the last bed the player has slept in, or the world's spawn if no such position was recorded." }, GetMaxSpeed = { Params = "", Return = "number", Notes = "Returns the player's current maximum speed, relative to the game default speed. Takes into account the sprinting / flying status." }, GetName = { Return = "string", Notes = "Returns the player's name" }, GetNormalMaxSpeed = { Params = "", Return = "number", Notes = "Returns the player's maximum walking speed, relative to the game default speed. Defaults to 1, but plugins may modify it for faster or slower walking." }, + GetPermissions = { Params = "", Return = "array-table of strings", Notes = "Returns the list of all permissions that the player has assigned to them through their rank." }, + GetPlayerListName = { Return = "string", Notes = "Returns the name that is used in the playerlist." }, GetResolvedPermissions = { Return = "array-table of string", Notes = "Returns all the player's permissions, as a table. The permissions are stored in the array part of the table, beginning with index 1." }, GetSprintingMaxSpeed = { Params = "", Return = "number", Notes = "Returns the player's maximum sprinting speed, relative to the game default speed. Defaults to 1.3, but plugins may modify it for faster or slower sprinting." }, GetStance = { Return = "number", Notes = "Returns the player's stance (Y-pos of player's eyes)" }, + GetTeam = { Params = "", Return = "{{cTeam}}", Notes = "Returns the team that the player belongs to, or nil if none." }, GetThrowSpeed = { Params = "SpeedCoeff", Return = "{{Vector3d}}", Notes = "Returns the speed vector for an object thrown with the specified speed coeff. Basically returns the normalized look vector multiplied by the coeff, with a slight random variation." }, GetThrowStartPos = { Params = "", Return = "{{Vector3d}}", Notes = "Returns the position where the projectiles should start when thrown by this player." }, + GetUUID = { Params = "", Return = "string", Notes = "Returns the (short) UUID that the player is using. Could be empty string for players that don't have a Mojang account assigned to them (in the future, bots for example)." }, GetWindow = { Params = "", Return = "{{cWindow}}", Notes = "Returns the currently open UI window. If the player doesn't have any UI window open, returns the inventory window." }, GetXpLevel = { Params = "", Return = "number", Notes = "Returns the current XP level (based on current XP amount)." }, GetXpLifetimeTotal = { Params = "", Return = "number", Notes = "Returns the amount of XP that has been accumulated throughout the player's lifetime." }, GetXpPercentage = { Params = "", Return = "number", Notes = "Returns the percentage of the experience bar - the amount of XP towards the next XP level. Between 0 and 1." }, + HasCustomName = { Params = "", Return = "bool", Notes = "Returns true if the player has a custom name." }, HasPermission = { Params = "PermissionString", Return = "bool", Notes = "Returns true if the player has the specified permission" }, Heal = { Params = "HitPoints", Return = "", Notes = "Heals the player by the specified amount of HPs. Only positive amounts are expected. Sends a health update to the client." }, IsEating = { Params = "", Return = "bool", Notes = "Returns true if the player is currently eating the item in their hand." }, @@ -1805,7 +1815,9 @@ a_Player:OpenWindow(Window); IsFlying = { Return = "bool", Notes = "Returns true if the player is flying." }, IsGameModeAdventure = { Params = "", Return = "bool", Notes = "Returns true if the player is in the gmAdventure gamemode, or has their gamemode unset and the world is a gmAdventure world." }, IsGameModeCreative = { Params = "", Return = "bool", Notes = "Returns true if the player is in the gmCreative gamemode, or has their gamemode unset and the world is a gmCreative world." }, + IsGameModeSpectator = { Params = "", Return = "bool", Notes = "Returns true if the player is in the gmSpectator gamemode, or has their gamemode unset and the world is a gmSpectator world." }, IsGameModeSurvival = { Params = "", Return = "bool", Notes = "Returns true if the player is in the gmSurvival gamemode, or has their gamemode unset and the world is a gmSurvival world." }, + IsInBed = { Params = "", Return = "bool", Notes = "Returns true if the player is currently lying in a bed." }, IsOnGround = { Params = "", Return = "bool", Notes = "Returns true if the player is on ground (not falling, not jumping, not flying)" }, IsSatiated = { Params = "", Return = "bool", Notes = "Returns true if the player is satiated (cannot eat)." }, IsVisible = { Params = "", Return = "bool", Notes = "Returns true if the player is visible to other players" }, @@ -1813,6 +1825,7 @@ a_Player:OpenWindow(Window); MoveTo = { Params = "{{Vector3d|NewPosition}}", Return = "Tries to move the player into the specified position." }, MoveToWorld = { Params = "WorldName", Return = "bool", Return = "Moves the player to the specified world. Returns true if successful." }, OpenWindow = { Params = "{{cWindow|Window}}", Return = "", Notes = "Opens the specified UI window for the player." }, + PermissionMatches = { Params = "Permission, Template", Return = "bool", Notes = "(STATIC) Returns true if the specified permission matches the specified template. The template may contain wildcards." }, Respawn = { Params = "", Return = "", Notes = "Restores the health, extinguishes fire, makes visible and sends the Respawn packet." }, SendMessage = { Params = "Message", Return = "", Notes = "Sends the specified message to the player." }, SendMessageFailure = { Params = "Message", Return = "", Notes = "Prepends Rose [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. For a command that failed to run because of insufficient permissions, etc." }, @@ -1821,12 +1834,12 @@ a_Player:OpenWindow(Window); SendMessagePrivateMsg = { Params = "Message, SenderName", Return = "", Notes = "Prepends Light Blue [MSG: *SenderName*] / prepends SenderName and colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. For private messaging." }, SendMessageSuccess = { Params = "Message", Return = "", Notes = "Prepends Green [INFO] / colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. Success notification." }, SendMessageWarning = { Params = "Message, Sender", Return = "", Notes = "Prepends Rose [WARN] / colours entire text (depending on ShouldUseChatPrefixes()) and sends message to player. Denotes that something concerning, such as plugin reload, is about to happen." }, - HasCustomName = { Params = "", Return = "bool", Notes = "Returns true if the player has a custom name." }, - GetCustomName = { Params = "", Return = "string", Notes = "Returns the custom name of this player. If the player hasn't a custom name, it will return an empty string." }, - SetCustomName = { Params = "string", Return = "", Notes = "Sets the custom name of this player. If you want to disable the custom name, simply set an empty string. The custom name will be used in the tab-list, in the player nametag and in the tab-completion." }, + SendRotation = { Params = "YawDegrees, PitchDegrees", Return = "", Notes = "Sends the specified rotation to the player, forcing them to look that way" }, + SetBedPos = { Params = "{{Vector3i|Position}}", Return = "", Notes = "Sets the internal representation of the last bed position the player has slept in. The player will respawn at this position if they die." }, SetCanFly = { Params = "CanFly", Notes = "Sets if the player can fly or not." }, SetCrouch = { Params = "IsCrouched", Return = "", Notes = "Sets the crouch state, broadcasts the change to other players." }, SetCurrentExperience = { Params = "XPAmount", Return = "", Notes = "Sets the current amount of experience (and indirectly, the XP level)." }, + SetCustomName = { Params = "string", Return = "", Notes = "Sets the custom name of this player. If you want to disable the custom name, simply set an empty string. The custom name will be used in the tab-list, in the player nametag and in the tab-completion." }, SetFlying = { Params = "IsFlying", Notes = "Sets if the player is flying or not." }, SetFlyingMaxSpeed = { Params = "FlyingMaxSpeed", Return = "", Notes = "Sets the flying maximum speed, relative to the game default speed. The default value is 1. Sends the updated speed to the client." }, SetFoodExhaustionLevel = { Params = "ExhaustionLevel", Return = "", Notes = "Sets the food exhaustion to the specified level." }, @@ -1840,7 +1853,11 @@ a_Player:OpenWindow(Window); SetNormalMaxSpeed = { Params = "NormalMaxSpeed", Return = "", Notes = "Sets the normal (walking) maximum speed, relative to the game default speed. The default value is 1. Sends the updated speed to the client, if appropriate." }, SetSprint = { Params = "IsSprinting", Return = "", Notes = "Sets whether the player is sprinting or not." }, SetSprintingMaxSpeed = { Params = "SprintingMaxSpeed", Return = "", Notes = "Sets the sprinting maximum speed, relative to the game default speed. The default value is 1.3. Sends the updated speed to the client, if appropriate." }, + SetTeam = { Params = "{{cTeam|Team}}", Return = "", Notes = "Moves the player to the specified team." }, SetVisible = { Params = "IsVisible", Return = "", Notes = "Sets the player visibility to other players" }, + TossEquippedItem = { Params = "[Amount]", Return = "", Notes = "Tosses the item that the player has selected in their hotbar. Amount defaults to 1." }, + TossHeldItem = { Params = "[Amount]", Return = "", Notes = "Tosses the item held by the cursor, then the player is in a UI window. Amount defaults to 1." }, + TossPickup = { Params = "{{cItem|Item}}", Return = "", Notes = "Tosses a pickup newly created from the specified item." }, XpForLevel = { Params = "XPLevel", Return = "number", Notes = "(STATIC) Returns the total amount of XP needed for the specified XP level. Inverse of CalcLevelFromXp()." }, }, Constants = @@ -2043,7 +2060,7 @@ cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChatMessage); ClearPlayerRanks = { Params = "", Return = "", Notes = "Removes all player ranks from the database. Note that this doesn't change the cPlayer instances for the already connected players, you need to update all the instances manually." }, GetAllGroups = { Params = "", Return = "array-table of groups' names", Notes = "Returns an array-table containing the names of all the groups that are known to the manager." }, GetAllPermissions = { Params = "", Return = "array-table of permissions", Notes = "Returns an array-table containing all the permissions that are known to the manager." }, - GetAllPlayers = { Params = "", Return = "array-table of uuids", Notes = "Returns the short uuids of all defined players, sorted by the players' names (case insensitive)." }, + GetAllPlayerUUIDs = { Params = "", Return = "array-table of uuids", Notes = "Returns the short uuids of all players stored in the rank DB, sorted by the players' names (case insensitive)." }, GetAllRanks = { Params = "", Return = "array-table of ranks' names", Notes = "Returns an array-table containing the names of all the ranks that are known to the manager." }, GetDefaultRank = { Params = "", Return = "string", Notes = "Returns the name of the default rank. " }, GetGroupPermissions = { Params = "GroupName", Return = "array-table of permissions", Notes = "Returns an array-table containing the permissions that the specified group contains." }, -- cgit v1.2.3 From adab829d8fc24e0bc21737f5e125e19620b1f87c Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 1 Oct 2014 20:14:28 +0100 Subject: Fixed broken code. --- MCServer/Plugins/APIDump/Hooks/OnServerPing.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua index 6d2325fe6..db1707e47 100644 --- a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua +++ b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua @@ -34,9 +34,9 @@ function OnServerPing(ClientHandle, ServerDescription, OnlinePlayers, MaxPlayers MaxPlayers = 0 -- Change favicon - if (cFile:IsFile("my-favicon.png")) then + if cFile:IsFile("my-favicon.png") then local FaviconData = cFile:ReadWholeFile("my-favicon.png") - if (FaviconData != "") then + if FaviconData ~= "" and FaviconData ~= nil then Favicon = Base64Encode(FaviconData) end end -- cgit v1.2.3 From a765e43ee0db7be62a7d5c643a70cfec5a07d116 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 1 Oct 2014 22:29:38 +0200 Subject: APIDump: Fixed cEntity documentation. --- MCServer/Plugins/APIDump/APIDesc.lua | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index 2f1c766cb..bf5003035 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -785,7 +785,9 @@ end AddSpeedX = { Params = "AddX", Return = "", Notes = "Adds the specified amount of speed in the X axis direction." }, AddSpeedY = { Params = "AddY", Return = "", Notes = "Adds the specified amount of speed in the Y axis direction." }, AddSpeedZ = { Params = "AddZ", Return = "", Notes = "Adds the specified amount of speed in the Z axis direction." }, + ArmorCoversAgainst = { Params = "{{cEntity|AttackerEntity}}, DamageType, RawDamage", Return = "number", Notes = "Returns the points out of a_RawDamage that the currently equipped armor would cover." }, Destroy = { Params = "", Return = "", Notes = "Schedules the entity to be destroyed" }, + GetAirLevel = { Params = "", Return = "number", Notes = "Returns the air level (number of ticks of air left). Note, this function is only updated with mobs or players." }, GetArmorCoverAgainst = { Params = "AttackerEntity, DamageType, RawDamage", Return = "number", Notes = "Returns the number of hitpoints out of RawDamage that the currently equipped armor would cover. See {{TakeDamageInfo}} for more information on attack damage." }, GetChunkX = { Params = "", Return = "number", Notes = "Returns the X-coord of the chunk in which the entity is placed" }, GetChunkZ = { Params = "", Return = "number", Notes = "Returns the Z-coord of the chunk in which the entity is placed" }, @@ -801,6 +803,7 @@ end GetHeadYaw = { Params = "", Return = "number", Notes = "Returns the pitch of the entity's head (FIXME: Rename to GetHeadPitch() )." }, GetHealth = { Params = "", Return = "number", Notes = "Returns the current health of the entity." }, GetHeight = { Params = "", Return = "number", Notes = "Returns the height (Y size) of the entity" }, + GetInvulnerableTicks = { Params = "", Return = "number", Notes = "Returns the number of ticks that this entity will be invulnerable for. This is used for after-hit recovery - the entities are invulnerable for half a second after being hit." }, GetKnockbackAmountAgainst = { Params = "ReceiverEntity", Return = "number", Notes = "Returns the amount of knockback that the currently equipped items would cause when attacking the ReceiverEntity." }, GetLookVector = { Params = "", Return = "{{Vector3f}}", Notes = "Returns the vector that defines the direction in which the entity is looking" }, GetMass = { Params = "", Return = "number", Notes = "Returns the mass of the entity. Currently unused." }, @@ -818,23 +821,29 @@ end GetSpeedX = { Params = "", Return = "number", Notes = "Returns the X-part of the speed vector" }, GetSpeedY = { Params = "", Return = "number", Notes = "Returns the Y-part of the speed vector" }, GetSpeedZ = { Params = "", Return = "number", Notes = "Returns the Z-part of the speed vector" }, + GetTicksAlive = { Params = "", Return = "number", Notes = "Returns the number of ticks that this entity has been alive for." }, GetUniqueID = { Params = "", Return = "number", Notes = "Returns the ID that uniquely identifies the entity within the running server. Note that this ID is not persisted to the data files." }, GetWidth = { Params = "", Return = "number", Notes = "Returns the width (X and Z size) of the entity." }, GetWorld = { Params = "", Return = "{{cWorld}}", Notes = "Returns the world where the entity resides" }, GetYaw = { Params = "", Return = "number", Notes = "Returns the yaw (direction) of the entity. Measured in degrees, values range from -180 to +180. 0 means ZP, 90 means XM, -180 means ZM, -90 means XP." }, + HandleSpeedFromAttachee = { Params = "ForwardAmount, SidewaysAmount", Return = "", Notes = "Updates the entity's speed based on the attachee exerting the specified force forward and sideways. Used for entities being driven by other entities attached to them - usually players driving minecarts and boats." }, Heal = { Params = "Hitpoints", Return = "", Notes = "Heals the specified number of hitpoints. Hitpoints is expected to be a positive number." }, IsA = { Params = "ClassName", Return = "bool", Notes = "Returns true if the entity class is a descendant of the specified class name, or the specified class itself" }, IsBoat = { Params = "", Return = "bool", Notes = "Returns true if the entity is a {{cBoat|boat}}." }, IsCrouched = { Params = "", Return = "bool", Notes = "Returns true if the entity is crouched. Always false for entities that don't support crouching." }, IsDestroyed = { Params = "", Return = "bool", Notes = "Returns true if the entity has been destroyed and is awaiting removal from the internal structures." }, + IsEnderCrystal = { Params = "", Return = "bool", Notes = "Returns true if the entity is an ender crystal." }, IsExpOrb = { Params = "", Return = "bool", Notes = "Returns true if the entity represents an experience orb" }, IsFallingBlock = { Params = "", Return = "bool", Notes = "Returns true if the entity represents a {{cFallingBlock}} entity." }, + IsFireproof = { Params = "", Return = "bool", Notes = "Returns true if the entity takes no damage from being on fire." }, IsFloater = { Params = "", Return = "bool", Notes = "Returns true if the entity represents a fishing rod floater" }, IsInvisible = { Params = "", Return = "bool", Notes = "Returns true if the entity is invisible" }, + IsItemFrame = { Params = "", Return = "bool", Notes = "Returns true if the entity is an item frame." }, IsMinecart = { Params = "", Return = "bool", Notes = "Returns true if the entity represents a {{cMinecart|minecart}}" }, IsMob = { Params = "", Return = "bool", Notes = "Returns true if the entity represents any {{cMonster|mob}}." }, IsOnFire = { Params = "", Return = "bool", Notes = "Returns true if the entity is on fire" }, IsPainting = { Params = "", Return = "bool", Notes = "Returns if this entity is a painting." }, + IsPawn = { Params = "", Return = "bool", Notes = "Returns true if the entity is a {{cPawn}} descendant." }, IsPickup = { Params = "", Return = "bool", Notes = "Returns true if the entity represents a {{cPickup|pickup}}." }, IsPlayer = { Params = "", Return = "bool", Notes = "Returns true if the entity represents a {{cPlayer|player}}" }, IsProjectile = { Params = "", Return = "bool", Notes = "Returns true if the entity is a {{cProjectileEntity}} descendant." }, @@ -844,12 +853,19 @@ end IsSubmerged = { Params = "", Return = "bool", Notes = "Returns true if the mob or player is submerged in water (head is in a water block). Note, this function is only updated with mobs or players." }, IsSwimming = { Params = "", Return = "bool", Notes = "Returns true if the mob or player is swimming in water (feet are in a water block). Note, this function is only updated with mobs or players." }, IsTNT = { Params = "", Return = "bool", Notes = "Returns true if the entity represents a {{cTNTEntity|TNT entity}}" }, + Killed = { Params = "{{cEntity|Victim}}", Return = "", Notes = "This entity has killed another entity (the Victim). For players, adds the scoreboard statistics about the kill." }, KilledBy = { Notes = "FIXME: Remove this from API" }, - GetAirLevel = { Params = "", Return = "number", Notes = "Returns the air level (number of ticks of air left). Note, this function is only updated with mobs or players." }, + MoveToWorld = + { + { Params = "{{cWorld|World}}, [ShouldSendRespawn]", Return = "bool", Notes = "Removes the entity from this world and starts moving it to the specified world. Note that to avoid deadlocks, the move is asynchronous - the entity is moved into a queue and will be moved from that queue into the destination world at some (unpredictable) time in the future. ShouldSendRespawn is used only for players, it specifies whether the player should be sent a Repawn packet upon leaving the world (The client handles respawns only between different dimensions)." }, + { Params = "WorldName, [ShouldSendRespawn]", Return = "bool", Notes = "Removes the entity from this world and starts moving it to the specified world. Note that to avoid deadlocks, the move is asynchronous - the entity is moved into a queue and will be moved from that queue into the destination world at some (unpredictable) time in the future. ShouldSendRespawn is used only for players, it specifies whether the player should be sent a Repawn packet upon leaving the world (The client handles respawns only between different dimensions)." }, + }, SetGravity = { Params = "Gravity", Return = "", Notes = "Sets the number that is used as the gravity for physics simulation. 1G (9.78) by default." }, SetHeadYaw = { Params = "HeadPitch", Return = "", Notes = "Sets the head pitch (FIXME: Rename to SetHeadPitch() )." }, SetHealth = { Params = "Hitpoints", Return = "", Notes = "Sets the entity's health to the specified amount of hitpoints. Doesn't broadcast any hurt animation. Doesn't kill the entity if health drops below zero. Use the TakeDamage() function instead for taking damage." }, SetHeight = { Params = "", Return = "", Notes = "FIXME: Remove this from API" }, + SetInvulnerableTicks = { Params = "NumTicks", Return = "", Notes = "Sets the amount of ticks for which the entity will not receive any damage from other entities." }, + SetIsFireproof = { Params = "IsFireproof", Return = "", Notes = "Sets whether the entity receives damage from being on fire." }, SetMass = { Params = "Mass", Return = "", Notes = "Sets the mass of the entity. Currently unused." }, SetMaxHealth = { Params = "MaxHitpoints", Return = "", Notes = "Sets the maximum hitpoints of the entity. If current health is above MaxHitpoints, it is capped to MaxHitpoints." }, SetPitch = { Params = "number", Return = "", Notes = "Sets the pitch (nose-down rotation) of the entity" }, @@ -864,7 +880,7 @@ end SetPosZ = { Params = "number", Return = "", Notes = "Sets the Z-coord of the entity's pivot" }, SetRoll = { Params = "number", Return = "", Notes = "Sets the roll (sideways rotation) of the entity. Currently unused." }, SetRot = { Params = "{{Vector3f|Rotation}}", Return = "", Notes = "Sets the entire rotation vector (Yaw, Pitch, Roll)" }, - SetYawFromSpeed = { Params = "", Return = "", Notes = "Sets the entity's yaw to match its current speed (entity looking forwards as it moves). (FIXME: Rename to SetYawFromSpeed)" }, + SetYawFromSpeed = { Params = "", Return = "", Notes = "Sets the entity's yaw to match its current speed (entity looking forwards as it moves)." }, SetSpeed = { { Params = "SpeedX, SpeedY, SpeedZ", Return = "", Notes = "Sets the current speed of the entity" }, @@ -890,18 +906,20 @@ end Constants = { etBoat = { Notes = "The entity is a {{cBoat}}" }, + etEnderCrystal = { Notes = "" }, etEntity = { Notes = "No further specialization available" }, etExpOrb = { Notes = "The entity is a {{cExpOrb}}" }, etFallingBlock = { Notes = "The entity is a {{cFallingBlock}}" }, etFloater = { Notes = "The entity is a fishing rod floater" }, + etItemFrame = { Notes = "" }, + etMinecart = { Notes = "The entity is a {{cMinecart}} descendant" }, etMob = { Notes = "The entity is a {{cMonster}} descendant" }, etMonster = { Notes = "The entity is a {{cMonster}} descendant" }, - etMinecart = { Notes = "The entity is a {{cMinecart}} descendant" }, - etPlayer = { Notes = "The entity is a {{cPlayer}}" }, + etPainting = { Notes = "The entity is a {{cPainting}}" }, etPickup = { Notes = "The entity is a {{cPickup}}" }, + etPlayer = { Notes = "The entity is a {{cPlayer}}" }, etProjectile = { Notes = "The entity is a {{cProjectileEntity}} descendant" }, etTNT = { Notes = "The entity is a {{cTNTEntity}}" }, - etPainting = { Notes = "The entity is a {{cPainting}}" }, }, ConstantGroups = { -- cgit v1.2.3 From 7c731dbd8ac55c5e5660df0e1f745a76489b646c Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 1 Oct 2014 21:37:20 +0100 Subject: Added parentheses for clarity. --- MCServer/Plugins/APIDump/Hooks/OnServerPing.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua index db1707e47..76b6d1517 100644 --- a/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua +++ b/MCServer/Plugins/APIDump/Hooks/OnServerPing.lua @@ -36,7 +36,7 @@ function OnServerPing(ClientHandle, ServerDescription, OnlinePlayers, MaxPlayers -- Change favicon if cFile:IsFile("my-favicon.png") then local FaviconData = cFile:ReadWholeFile("my-favicon.png") - if FaviconData ~= "" and FaviconData ~= nil then + if (FaviconData ~= "") and (FaviconData ~= nil) then Favicon = Base64Encode(FaviconData) end end -- cgit v1.2.3 From 017ba1c32a8f5f43dcf769692ad2ffea497aee5e Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Sun, 5 Oct 2014 11:08:10 +0200 Subject: Made WebAdmin design more modern --- MCServer/webadmin/files/style.css | 496 +++++++++++++++++++----------------- MCServer/webadmin/template.lua | 63 ++--- MCServer/webadmin/template_orig.lua | 137 ++++++++++ 3 files changed, 431 insertions(+), 265 deletions(-) create mode 100644 MCServer/webadmin/template_orig.lua (limited to 'MCServer') diff --git a/MCServer/webadmin/files/style.css b/MCServer/webadmin/files/style.css index e7ffe3999..a1d9993de 100644 --- a/MCServer/webadmin/files/style.css +++ b/MCServer/webadmin/files/style.css @@ -1,326 +1,354 @@ -/* reset CSS */ - -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, font, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td { - margin: 0; +body, html +{ + font-family: "Open Sans"; padding: 0; - border: 0; - outline: 0; - font-size: 100%; - vertical-align: baseline; - background: transparent; + margin: 0; + font-weight: 400; + background-color: #fbe9e7; + color: rgba(0, 0, 0, 0.87); +} + +.light { font-weight: 300; } +.bold { font-weight: 600; } + +#wrapper +{ + background-color: #ff5722; + margin: 40px auto; + width: 99%; + max-width: 1200px; + box-sizing: border-box; + -moz-box-sizing: border-box; + box-shadow: 0px 4px 5px rgba(0, 0, 0, 0.15); + color: rgba(0, 0, 0, 0.87); +} + +.title +{ + font-size: 30pt; + padding: 10px 40px; + text-decoration: none; + color: white; + text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3); + display: block; } -body { - line-height: 1; + +#sidebar +{ + float: left; + width: 20%; } -ol, ul { + +.sideNav +{ list-style: none; -} -blockquote, q { - quotes: none; + background-color: #fafafa; + margin: 20px 0; + padding: 5px 0; + width: 100%; + box-shadow: 1px 0px 10px rgba(0, 0, 0, 0.2); } -/* remember to define focus styles! */ -:focus { - outline: 0; +.sideNav li +{ + padding: 10px; + color: rgba(0, 0, 0, 0.54); } -/* remove textarea resize at Safari */ -textarea { - resize: none; +.sideNav li.link +{ + padding-left: 30px; } -/* remember to highlight inserts somehow! */ -ins { +.sideNav li.link a +{ text-decoration: none; + color: rgba(0, 0, 0, 0.87); } -del { - text-decoration: line-through; -} - -/* tables still need 'cellspacing="0"' in the markup */ -table { - border-collapse: collapse; - border-spacing: 0; -} - -/* - Origional from http://www.perspectived.com/ - Modified by Ben Phelps - Made for FakeTruth - MCServer -*/ - -/* Basic ---------------------------------------- */ - -.clear { clear: both; } - -body { - background: white; - font-family: Arial, Helvetica, sans-serif; - font-size: 12px; - color: #646464; - text-align: center; +#container +{ + margin: 0; + padding: 0; + overflow: hidden; + background-color: #f5f5f5; } -#wrapper { - text-align: left; - width: 930px; - margin: 0 auto; +#main +{ + float: right; + width: 80%; + padding: 0 15px 20px 15px; + box-sizing: border-box; + -moz-box-sizing: border-box; } -/* Logo ---------------------------------------- */ - -h1 { - margin: 15px 0 10px 5px; - width: 180px; - height: 36px; - background: url(logo.png) no-repeat left top; +.clear +{ + clear: both; } -h1 a { - display: block; - width: 225px; - height: 28px; +table +{ + width: 100%; + border-collapse: collapse; } -h1 span { display: none; } - -a { - color: #646464; +table td +{ + padding: 5px; } -/* Container ---------------------------------------- */ - -#containerHolder { - background: #eee; +table th +{ + border-bottom: 1px solid rgba(0, 0, 0, 0.12); padding: 5px; + text-align: center; } - -#container { - background: #fff url(background.gif) repeat-y left top; - border: 1px solid #ddd; - width: 918px; - +table tr:nth-child(odd) +{ + background-color: rgba(0, 0, 0, 0.015); } -#connectHolder { - background: #eee; - padding: 5px; - margin-bottom:8px; +p +{ + margin: 8px 0; + padding: 8px 3px; } - -#connect { - border: 1px solid #ddd; - background-color: #fff; - padding:5px; - width: 908px; +a +{ + text-decoration: none; + color: #0277bd; + -webkit-transition: color 0.1s linear; + -moz-transition: color 0.1s linear; + transition: color 0.1s linear; } -.pics { - height: 375px; - width: 600px; -} - -.pics img { - padding: 5px; - border: 1px solid #ddd; - background-color: #eee; - width: 600px; - height: 375px; - margin-left: 15px; +a:hover +{ + color: #01579b; } -/* Login -------------------------------------- */ - -#loginLogo { - margin: 0 auto; - margin-top:100px; - width: 180px; - height: 36px; - background-image: url(logo.png); +.welcome-msg +{ + color: rgba(0, 0, 0, 0.54); } -#loginHolder { - background: #eee; - padding: 5px; - width: 310px; - margin: 0 auto; - height: 90px; - margin-top:20px; +.username +{ + text-transform: capitalize; + color: rgba(0, 0, 0, 0.87); } -#login { - padding:10px; - width: 288px; - height: 68px; - border: 1px solid #ddd; - background:#fff; - text-align: left; +a:hover +{ + color: black; } - -/* Sidebar ---------------------------------------- */ - -#sidebar { - width: 179px; - float: left; +input, select +{ + padding: 8px; } -#sidebar .sideNav { width: 179px; } +form +{ + padding: 4px; +} -#sidebar .sideNav li { border-bottom: 1px solid #ddd; width: 179px; } +.info input[type="submit"], .info button, .info input[type="button"], +.warn input[type="submit"], .warn button, .warn input[type="button"], +.err input[type="submit"], .err button, .err input[type="button"] +{ + float: right; +} -#sidebar .sideNav li a { +.err +{ + color: white; display: block; - color: #646464; - background: #f6f6f6; - text-decoration: none; - height: 29px; - line-height: 29px; - padding: 0 19px; - width: 141px; + background-color: #e51c23 !important; + padding: 15px; + line-height: 30px; + min-height: 30px; } -#sidebar .sideNav li a:hover { background: #fdfcf6; } - -#sidebar .sideNav li a.active, #sidebar .sideNav li a.active:hover { - background: #f0f7fa; - color: #c66653; +.err:before +{ + content: "ERROR: "; } -/* Breadcrumb ---------------------------------------- */ - -h2 { - width: 718px; - float: right; - color: #646464; - font-size: 16px; - line-height: 16px; - font-weight: bold; - margin: 20px 0 0 0; - padding: 0 0 10px 0; - border-bottom: 1px solid #ddd; +.warn +{ + color: white; + display: block; + background-color: #ff5722 !important; + padding: 15px; + line-height: 30px; + min-height: 30px; } -h2 a { - color: #646464; - text-decoration: none; +.warn:before +{ + content: "WARNING: "; } -h2 a.active { color: #c66653; } +.info +{ + color: white; + display: block; + background-color: #5677fc !important; + padding: 15px; + line-height: 30px; + min-height: 30px; +} -h2 a:hover { text-decoration: underline; } +.info:before +{ + content: "INFORMATION: "; +} -/* Content ---------------------------------------- */ +#footer .fleft +{ + float: left; +} -#main { - width: 700px; +#footer .fright +{ float: right; - padding: 0 19px 0 0; + text-align: right; } -#main p { - +#footer +{ + margin: 0; padding: 10px; + font-size: 9pt; + color: rgba(255, 255, 255, 0.8); + box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.2) inset; +} +#footer a +{ + text-transform: none; + color: white; } -h3 { - font-size: 14px; - line-height: 14px; - font-weight: bold; - color: #5494af; - padding: 0 0 0 10px; - margin: 20px 0 10px; +input[type="submit"], button, input[type="button"] +{ + background-color: #ffc107; + padding: 8px 15px 8px 15px; + margin: 0 2px; + display: inline-block; + text-align: center; + color: black; + box-shadow: 0px 2px 3px rgba(0,0,0,0.2); + border: none; + outline: none; + cursor: pointer; } -h4 { - padding: 0 0 0 10px; - margin: 20px 0 10px; +input[type="submit"]:hover, button:hover, input[type="button"]:hover +{ + background-color: #ffca28; } -#main ul { - padding: 0 0 0 10px; - list-style-type: circle; - list-style-position: inside; +input[type="submit"]:active, button:active, input[type="button"]:active +{ + background-color: #ffd54f; + -webkit-transform: translateY(1px); + -moz-transform: translateY(1px); + transform: translateY(1px); } -#main table { - border-top: 1px solid #ddd; - width: 700px; +hr +{ + border: none; + height: 1px; + background-color: rgba(0, 0, 0, 0.12); } -#main table tr th { - text-align: left; - background: #f6f6f6; - padding: 0px 20px; - height: 20px; - line-height: 20px; - border-bottom: 1px solid #ddd; +h4 +{ + padding-bottom: 10px; + margin-bottom: 12px; + border-bottom: 1px solid rgba(0, 0, 0, 0.12); } -#main table tr td { - background: #f6f6f6; - padding: 0px 20px; - height: 29px; - line-height: 29px; - border-bottom: 1px solid #ddd; + +/**** PAGE SPECIFIC CSS ****/ + +/* remove the * for disabling: */ + +.page-core-server-settings table td +{ + text-align: center; + width: 25%; } -#main table tr.odd td { - background: #fbfbfb; +.page-core-server-settings.no-param table td:nth-child(1) a, +.page-core-server-settings.param-tab-general table td:nth-child(1) a +{ + font-weight: 600; + color: rgba(0, 0, 0, 0.87); } -#main table tr:hover td { background: #fdfcf6; } +.page-core-server-settings.param-tab-monsters table td:nth-child(2) a +{ + font-weight: 600; + color: rgba(0, 0, 0, 0.87); +} -#main table .action { - text-align: right; - padding: 0 20px 0 10px; +.page-core-server-settings.param-tab-worlds table td:nth-child(3) a +{ + font-weight: 600; + color: rgba(0, 0, 0, 0.87); } -#main table tr .action a { margin: 0 0 0 10px; text-decoration: none; color: #9b9b9b; } -#main table tr:hover .action .edit { color: #c5a059; } -#main table tr:hover .action .delete { color: #a02b2b; } -#main table tr:hover .action .view { color: #55a34a; } +.page-core-server-settings.param-tab-world table td:nth-child(4) a +{ + font-weight: 600; + color: rgba(0, 0, 0, 0.87); +} -#main table tr:hover .action a:hover { text-decoration: underline; } +.page-core-permissions form table tr, +.page-core-permissions form table td, +.page-core-permissions form table th +{ + border: none; + background-color: transparent; +} -fieldset { - border: 1px solid #ddd; - padding: 19px; - margin: 0 0 20px 0; - background: #fbfbfb; +.page-core-permissions form table tr:nth-child(1) th +{ + width: 35%; } -form p { margin: 0 0 14px 0; float: left; width: 100%; } +.page-core-permissions form table tr:nth-child(1) td +{ + width: 65%; +} -label { - display: block; +.page-core-permissions form table td input +{ width: 100%; - margin: 0 0 7px 0; - line-height: 12px; + box-sizing: border-box; + -moz-box-sizing: border-box; + margin: 0; } -/* Footer ---------------------------------------- */ +#ChatDiv +{ + margin-bottom: 10px; +} -#footer { - margin: 10px 0 30px 0; - font-size: 11px; - line-height: 11px; - color: #9B9B9B; - padding: 0 0 0 5px; +#ChatMessage +{ + width: 100%; + box-sizing: border-box; + -moz-box-sizing: border-box; } -#footer a { color: #9B9B9B; } -#footer a:hover { text-decoration: none; } +/**/ \ No newline at end of file diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua index a7480f83e..84a50b055 100644 --- a/MCServer/webadmin/template.lua +++ b/MCServer/webadmin/template.lua @@ -70,25 +70,33 @@ function ShowPage(WebAdmin, TemplateRequest) PageContent, SubTitle = GetDefaultPage() end + local reqParamsClass = "" + + for key,value in pairs(TemplateRequest.Request.Params) do + reqParamsClass = reqParamsClass .. " param-" .. string.lower(string.gsub(key, "[^a-zA-Z0-9]+", "-") .. "-" .. string.gsub(value, "[^a-zA-Z0-9]+", "-")) + end + + if (string.gsub(reqParamsClass, "%s", "") == "") then + reqParamsClass = " no-param" + end + Output([[ ]] .. Title .. [[ - + + - -
- -

- MCServer -

-
-
-
- + +
- ]]) +]]) return table.concat(SiteContent) end diff --git a/MCServer/webadmin/template_orig.lua b/MCServer/webadmin/template_orig.lua new file mode 100644 index 000000000..a7480f83e --- /dev/null +++ b/MCServer/webadmin/template_orig.lua @@ -0,0 +1,137 @@ +-- Use a table for fast concatenation of strings +local SiteContent = {} +function Output(String) + table.insert(SiteContent, String) +end + + + + + +function GetTableSize(Table) + local Size = 0 + for key,value in pairs(Table) do + Size = Size + 1 + end + return Size +end + + + + + +function GetDefaultPage() + local PM = cRoot:Get():GetPluginManager() + + local SubTitle = "Current Game" + local Content = "" + + Content = Content .. "

Server Name:

" + Content = Content .. "

" .. cRoot:Get():GetServer():GetServerID() .. "

" + + Content = Content .. "

Plugins:

    " + local AllPlugins = PM:GetAllPlugins() + for key,value in pairs(AllPlugins) do + if( value ~= nil and value ~= false ) then + Content = Content .. "
  • " .. key .. " V." .. value:GetVersion() .. "
  • " + end + end + + Content = Content .. "
" + Content = Content .. "

Players:

    " + + local AddPlayerToTable = function( Player ) + Content = Content .. "
  • " .. Player:GetName() .. "
  • " + end + cRoot:Get():ForEachPlayer( AddPlayerToTable ) + + Content = Content .. "

"; + + return Content, SubTitle +end + + + + + +function ShowPage(WebAdmin, TemplateRequest) + SiteContent = {} + local BaseURL = WebAdmin:GetBaseURL(TemplateRequest.Request.Path) + local Title = "MCServer WebAdmin" + local MemoryUsageKiB = cRoot:GetPhysicalRAMUsage() + local NumChunks = cRoot:Get():GetTotalChunkCount() + local PluginPage = WebAdmin:GetPage(TemplateRequest.Request) + local PageContent = PluginPage.Content + local SubTitle = PluginPage.PluginName + if (PluginPage.TabName ~= "") then + SubTitle = PluginPage.PluginName .. " - " .. PluginPage.TabName + end + if (PageContent == "") then + PageContent, SubTitle = GetDefaultPage() + end + + Output([[ + + + + +]] .. Title .. [[ + + + + +
+ +

+ MCServer +

+
+
+ + + +

Welcome ]] .. TemplateRequest.Request.Username .. [[

+
+

]] .. SubTitle .. [[

+ ]] .. PageContent .. [[ +
+ + +
+ +
+ +
+ + + +
+ + + + ]]) + + return table.concat(SiteContent) +end -- cgit v1.2.3 From 3baacce51e05ea4cc6d7352475b08a35ba8bc2a0 Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Sun, 5 Oct 2014 11:14:16 +0200 Subject: Added license --- MCServer/webadmin/files/style.css | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/style.css b/MCServer/webadmin/files/style.css index a1d9993de..3c8c8750f 100644 --- a/MCServer/webadmin/files/style.css +++ b/MCServer/webadmin/files/style.css @@ -1,3 +1,19 @@ +/* + * Copyright 2014 WebFreak001 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + body, html { font-family: "Open Sans"; -- cgit v1.2.3 From 828ded593cad10018dce226541bf782e6f2f545e Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Sun, 5 Oct 2014 11:24:54 +0200 Subject: Added newline --- MCServer/webadmin/files/style.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/style.css b/MCServer/webadmin/files/style.css index 3c8c8750f..5860c00e1 100644 --- a/MCServer/webadmin/files/style.css +++ b/MCServer/webadmin/files/style.css @@ -366,5 +366,4 @@ h4 -moz-box-sizing: border-box; } - -/**/ \ No newline at end of file +/**/ -- cgit v1.2.3 From cea0707ad5144e698fec6bf6a02174c7f1fd58cd Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Sun, 5 Oct 2014 11:35:29 +0200 Subject: Removed my license, added me to CONTRIBUTORS --- MCServer/webadmin/files/style.css | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/style.css b/MCServer/webadmin/files/style.css index 5860c00e1..211f9f9a3 100644 --- a/MCServer/webadmin/files/style.css +++ b/MCServer/webadmin/files/style.css @@ -1,19 +1,3 @@ -/* - * Copyright 2014 WebFreak001 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - body, html { font-family: "Open Sans"; -- cgit v1.2.3 From 7aa81de2c67a3347720c9a5772832577b92a81d6 Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Sun, 5 Oct 2014 11:48:44 +0200 Subject: added font callback --- MCServer/webadmin/files/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/style.css b/MCServer/webadmin/files/style.css index 211f9f9a3..7f01b34b2 100644 --- a/MCServer/webadmin/files/style.css +++ b/MCServer/webadmin/files/style.css @@ -1,6 +1,6 @@ body, html { - font-family: "Open Sans"; + font-family: "Open Sans", Tahoma, sans-serif; padding: 0; margin: 0; font-weight: 400; -- cgit v1.2.3 From 02617a11cd6454c7a1d35bded1413828460cfdeb Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 5 Oct 2014 15:05:24 +0200 Subject: Updated Core. --- MCServer/Plugins/Core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/Plugins/Core b/MCServer/Plugins/Core index 3a0e0597b..f8c2531fb 160000 --- a/MCServer/Plugins/Core +++ b/MCServer/Plugins/Core @@ -1 +1 @@ -Subproject commit 3a0e0597b7a24c44bf87ec90beb9be48d0b99709 +Subproject commit f8c2531fbef9bfd0b6f024d4d3319384a70a0831 -- cgit v1.2.3 From a8aeceab9d6e5e5e36ef7bd58783b65aca4d8be7 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 5 Oct 2014 20:19:21 +0200 Subject: cClientHandle: Added protocol version knowledge. --- MCServer/Plugins/APIDump/APIDesc.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'MCServer') diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index bf5003035..6a151b5ef 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -529,6 +529,7 @@ end GetLocale = { Params = "", Return = "Locale", Notes = "Returns the locale string that the client sends as part of the protocol handshake. Can be used to provide localized strings." }, GetPing = { Params = "", Return = "number", Notes = "Returns the ping time, in ms" }, GetPlayer = { Params = "", Return = "{{cPlayer|cPlayer}}", Notes = "Returns the player object connected to this client. Note that this may be nil, for example if the player object is not yet spawned." }, + GetProtocolVersion = { Params = "", Return = "number", Notes = "Returns the protocol version number of the protocol that the client is talking. Returns zero if the protocol version is not (yet) known." }, GetUniqueID = { Params = "", Return = "number", Notes = "Returns the UniqueID of the client used to identify the client in the server" }, GetUUID = { Params = "", Return = "string", Notes = "Returns the authentication-based UUID of the client. This UUID should be used to identify the player when persisting any player-related data. Returns a 32-char UUID (no dashes)" }, GetUsername = { Params = "", Return = "string", Notes = "Returns the username that the client has provided" }, -- cgit v1.2.3 From de41e2a04cfae499e89f7edd96e160d854f6602c Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 8 Oct 2014 21:04:26 +0100 Subject: Removed ChunkWorx --- MCServer/Plugins/ChunkWorx/ChunkWorx.deproj | 9 - MCServer/Plugins/ChunkWorx/chunkworx_main.lua | 128 ------------ MCServer/Plugins/ChunkWorx/chunkworx_web.lua | 274 -------------------------- 3 files changed, 411 deletions(-) delete mode 100644 MCServer/Plugins/ChunkWorx/ChunkWorx.deproj delete mode 100644 MCServer/Plugins/ChunkWorx/chunkworx_main.lua delete mode 100644 MCServer/Plugins/ChunkWorx/chunkworx_web.lua (limited to 'MCServer') diff --git a/MCServer/Plugins/ChunkWorx/ChunkWorx.deproj b/MCServer/Plugins/ChunkWorx/ChunkWorx.deproj deleted file mode 100644 index 17420d1d7..000000000 --- a/MCServer/Plugins/ChunkWorx/ChunkWorx.deproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - chunkworx_main.lua - - - chunkworx_web.lua - - diff --git a/MCServer/Plugins/ChunkWorx/chunkworx_main.lua b/MCServer/Plugins/ChunkWorx/chunkworx_main.lua deleted file mode 100644 index 88ecb3979..000000000 --- a/MCServer/Plugins/ChunkWorx/chunkworx_main.lua +++ /dev/null @@ -1,128 +0,0 @@ --- Global variables -PLUGIN = {} -- Reference to own plugin object -GENERATION_STATE = 0 -OPERATION_CODE = 0 -- 0 = generation -CX = 0 -CZ = 0 -CURRENT = 0 -TOTAL = 0 - --- AREA Variables -AreaStartX = -10 -AreaStartZ = -10 -AreaEndX = 10 -AreaEndZ = 10 - --- RADIAL Variables -RadialX = 0 -RadialZ = 0 -Radius = 10 - --- WORLD -WORK_WORLD = cRoot:Get():GetDefaultWorld():GetName() -WW_instance = cRoot:Get():GetDefaultWorld() -WORLDS = {} - - - - - -function Initialize(Plugin) - PLUGIN = Plugin - - PLUGIN:SetName("ChunkWorx") - PLUGIN:SetVersion(6) - - cPluginManager.AddHook(cPluginManager.HOOK_TICK, OnTick) - - Plugin:AddWebTab("(Re)Generation", HandleRequest_Generation) - - GENERATION_STATE = 0 - WW_instance = cRoot:Get():GetWorld(WORK_WORLD) - if (WW_instance == nil) then - LOG("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": NO WORLD found :(") - end - - -- Read the stored values: - local SettingsIni = cIniFile(); - SettingsIni:ReadFile("ChunkWorx.ini"); -- ignore any read errors - AreaStartX = SettingsIni:GetValueSetI("Area data", "StartX", AreaStartX) - AreaStartZ = SettingsIni:GetValueSetI("Area data", "StartZ", AreaStartZ) - AreaEndX = SettingsIni:GetValueSetI("Area data", "EndX", AreaEndX) - AreaEndZ = SettingsIni:GetValueSetI("Area data", "EndZ", AreaEndZ) - RadialX = SettingsIni:GetValueSetI("Radial data", "RadialX", RadialX) - RadialZ = SettingsIni:GetValueSetI("Radial data", "RadialZ", RadialZ) - Radius = SettingsIni:GetValueSetI("Radial data", "Radius", Radius) - SettingsIni:WriteFile("ChunkWorx.ini"); - - LOG("Initialized " .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion()) - return true -end - - - - - -function OnTick( DeltaTime ) - if (GENERATION_STATE == 1 or GENERATION_STATE == 3) then - LOGINFO("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": works STARTED!") - LOGINFO("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": At world: " .. WORK_WORLD) - WW_instance = cRoot:Get():GetWorld(WORK_WORLD) - if (GENERATION_STATE == 1) then GENERATION_STATE = 2 end - if (GENERATION_STATE == 3) then GENERATION_STATE = 4 end - - -- Changing in case coordinates are flipped - local shifter = AreaEndX - if (AreaStartX > AreaEndX) then - AreaEndX = AreaStartX - AreaStartX = shifter - end - shifter = AreaEndZ - if (AreaStartZ > AreaEndZ) then - AreaEndZ = AreaStartZ - AreaStartZ = shifter - end - - CX = AreaStartX - CZ = AreaStartZ - CURRENT = 0 - - if (WW_instance == nil) then - LOGERROR("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": works ABORTED") - LOGERROR("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": NO WORLD found :(") - GENERATION_STATE = 0 - end - end - - - - if (GENERATION_STATE == 2 or GENERATION_STATE == 4) then - if (WW_instance:GetGeneratorQueueLength() < 200 - and WW_instance:GetLightingQueueLength() < 200 - and (WW_instance:GetStorageSaveQueueLength() + WW_instance:GetStorageLoadQueueLength()) < 80) then - local chunk_sum = (1+ AreaEndX - AreaStartX) * (1+ AreaEndZ - AreaStartZ) - TOTAL = chunk_sum - LOG("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": PROCESSING 100 chunks, (" .. CURRENT .. "/" .. chunk_sum .. ")") - for C = 1, 100 do - if (GENERATION_STATE == 2) then WW_instance:GenerateChunk(CX, CZ) end - if (GENERATION_STATE == 4) then WW_instance:RegenerateChunk(CX, CZ) end - - CX = CX + 1 - CURRENT = CURRENT + 1 - if (CX > AreaEndX) then - CX = AreaStartX - CZ = CZ + 1 - if (CZ > AreaEndZ) then - if (GENERATION_STATE == 2) then LOGINFO("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. " - generation ENDED!") end - if (GENERATION_STATE == 4) then LOGINFO("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. " - REgeneration ENDED!") end - - GENERATION_STATE = 0 - break - end - end - end - WW_instance:QueueSaveAllChunks() - WW_instance:QueueUnloadUnusedChunks() - end - end -end \ No newline at end of file diff --git a/MCServer/Plugins/ChunkWorx/chunkworx_web.lua b/MCServer/Plugins/ChunkWorx/chunkworx_web.lua deleted file mode 100644 index 9aec38b12..000000000 --- a/MCServer/Plugins/ChunkWorx/chunkworx_web.lua +++ /dev/null @@ -1,274 +0,0 @@ - --- chunkworx_web.lua - --- WebAdmin-related functions - - - - - -local function Buttons_Player( Name ) - return "
" -end - - - - - -local function Button_World( Name ) - return "
" -end - - - - - -local function SaveSettings() - local SettingsIni = cIniFile() - SettingsIni:SetValueI("Area data", "StartX", AreaStartX) - SettingsIni:SetValueI("Area data", "StartZ", AreaStartZ) - SettingsIni:SetValueI("Area data", "EndX", AreaEndX) - SettingsIni:SetValueI("Area data", "EndZ", AreaEndZ) - SettingsIni:SetValueI("Radial data", "RadialX", RadialX) - SettingsIni:SetValueI("Radial data", "RadialZ", RadialZ) - SettingsIni:SetValueI("Radial data", "Radius", Radius) - SettingsIni:WriteFile("ChunkWorx.ini") -end - - - - - -function HandleRequest_Generation( Request ) - local Content = "" - if (Request.PostParams["AGHRRRR"] ~= nil) then - GENERATION_STATE = 0 - WW_instance:QueueSaveAllChunks() - WW_instance:QueueUnloadUnusedChunks() - LOGERROR("" .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. ": works ABORTED by admin") - end - --Content = Content .. "" - -- PROCESSING - -------------------------------------------------------------------------------------------------- - local function ProcessingContent() - local _small_content = "" - _small_content = _small_content .. "" - _small_content = _small_content .. "

World for operations:

"..WORK_WORLD - if (OPERATION_CODE == 0) then - _small_content = _small_content .. "

Operation:

Generation" - elseif (OPERATION_CODE == 1) then - _small_content = _small_content .. "

Operation:

Regeneration" - end - _small_content = _small_content .. "

Area:

["..AreaStartX..":"..AreaStartZ.."] ["..AreaEndX..":"..AreaEndZ.."]" - _small_content = _small_content .. "

Progress:

"..CURRENT.."/"..TOTAL - _small_content = _small_content .. "
" - _small_content = _small_content .. "
" - _small_content = _small_content .. "" - _small_content = _small_content .. "
" - return _small_content - end - if (GENERATION_STATE == 2 or GENERATION_STATE == 4) then - Content = ProcessingContent() - return Content - end - -- SELECTING - -------------------------------------------------------------------------------------------------- - if ( Request.PostParams["FormSetWorld"] ) then - WORK_WORLD = Request.PostParams["FormWorldName"] - WW_instance = cRoot:Get():GetWorld(WORK_WORLD) - end - - if( Request.PostParams["SelectWorld"] ~= nil - and Request.PostParams["WorldName"] ~= nil ) then -- World is selected! - WORK_WORLD = Request.PostParams["WorldName"] - WW_instance = cRoot:Get():GetWorld(WORK_WORLD) - end - - if(Request.PostParams["OperationGenerate"] ~= nil) then - OPERATION_CODE = 0 - end - if(Request.PostParams["OperationReGenerate"] ~= nil) then - OPERATION_CODE = 1 - end - - if (GENERATION_STATE == 0) then - if( Request.PostParams["FormAreaStartX"] ~= nil - and Request.PostParams["FormAreaStartZ"] ~= nil - and Request.PostParams["FormAreaEndX"] ~= nil - and Request.PostParams["FormAreaEndZ"] ~= nil ) then --(Re)Generation valid! - -- COMMON (Re)gen - if( Request.PostParams["StartArea"]) then - AreaStartX = tonumber(Request.PostParams["FormAreaStartX"]) - AreaStartZ = tonumber(Request.PostParams["FormAreaStartZ"]) - AreaEndX = tonumber(Request.PostParams["FormAreaEndX"]) - AreaEndZ = tonumber(Request.PostParams["FormAreaEndZ"]) - SaveSettings(); - if (OPERATION_CODE == 0) then - GENERATION_STATE = 1 - elseif (OPERATION_CODE == 1) then - GENERATION_STATE = 3 - end - Content = ProcessingContent() - return Content - end - end - if( Request.PostParams["FormRadialX"] ~= nil - and Request.PostParams["FormRadialZ"] ~= nil - and Request.PostParams["FormRadius"] ~= nil ) then --(Re)Generation valid! - -- COMMON (Re)gen - if( Request.PostParams["StartRadial"]) then - RadialX = tonumber(Request.PostParams["FormRadialX"]) or 0 - RadialZ = tonumber(Request.PostParams["FormRadialZ"]) or 0 - Radius = tonumber(Request.PostParams["FormRadius"]) or 10 - AreaStartX = RadialX - Radius - AreaStartZ = RadialZ - Radius - AreaEndX = RadialX + Radius - AreaEndZ = RadialZ + Radius - SaveSettings() - if (OPERATION_CODE == 0) then - GENERATION_STATE = 1 - elseif (OPERATION_CODE == 1) then - GENERATION_STATE = 3 - end - Content = ProcessingContent() - return Content - end - end - -- POINT REGEN! - if( Request.PostParams["FormPointX"] ~= nil - and Request.PostParams["FormPointZ"] ~= nil ) then --ReGeneration valid! - -- EXACT - if ( Request.PostParams["PointExact"] ~= nil) then - AreaStartX = tonumber(Request.PostParams["FormPointX"]) - AreaStartZ = tonumber(Request.PostParams["FormPointZ"]) - AreaEndX = AreaStartX - AreaEndZ = AreaStartZ - GENERATION_STATE = 3 - Content = ProcessingContent() - return Content - end - -- 3x3 - if ( Request.PostParams["Point3x3"] ~= nil) then - AreaStartX = tonumber(Request.PostParams["FormPointX"]) - 1 - AreaStartZ = tonumber(Request.PostParams["FormPointZ"]) - 1 - AreaEndX = AreaStartX + 2 - AreaEndZ = AreaStartZ + 2 - GENERATION_STATE = 3 - Content = ProcessingContent() - return Content - end - end - - local GetAreaByPlayer = function(Player) - -- Player is valid only within this function, it cannot be stord and used later! - AreaStartX = Player:GetChunkX() - AreaStartZ = Player:GetChunkZ() - end - -- PLAYERS REGEN! - if( Request.PostParams["PlayerExact"] ~= nil - and Request.PostParams["PlayerName"] ~= nil ) then -- Making BOOM! I meant, regenereate... - cRoot:Get():GetWorld(WORK_WORLD):DoWithPlayer(Request.PostParams["PlayerName"],GetAreaByPlayer) - AreaEndX = AreaStartX - AreaEndZ = AreaStartZ - GENERATION_STATE = 3 - Content = ProcessingContent() - return Content - end - if( Request.PostParams["Player3x3"] ~= nil - and Request.PostParams["PlayerName"] ~= nil ) then -- Making BOOM! I meant, regenereate... - cRoot:Get():GetWorld(WORK_WORLD):DoWithPlayer(Request.PostParams["PlayerName"],GetAreaByPlayer) - AreaStartX = AreaStartX - 1 - AreaStartZ = AreaStartZ - 1 - AreaEndX = AreaStartX + 2 - AreaEndZ = AreaStartZ + 2 - GENERATION_STATE = 3 - Content = ProcessingContent() - return Content - end - end - - --Content = Content .. "

World for operations: " .. WORK_WORLD .. "

" - --Content = Content .. "
" - --Content = Content .. "" - --Content = Content .. "
" - - -- SELECTING WORK_WORLD - Content = Content .. "

World for operations: " .. WORK_WORLD .. "

" - Content = Content .. "" - local WorldNum = 0 - local AddWorldToTable = function(World) - WorldNum = WorldNum + 1 - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - end - cRoot:Get():ForEachWorld(AddWorldToTable) - if( WorldNum == 0 ) then - Content = Content .. "" - end - Content = Content .. "
" .. WorldNum .. "." .. World:GetName() .. "" .. Button_World(World:GetName()) .. "
No worlds! O_O
" - Content = Content .. "
" - - -- SELECTING OPERATION - if (OPERATION_CODE == 0) then - Content = Content .. "

Operation: Generation

" - elseif (OPERATION_CODE == 1) then - Content = Content .. "

Operation: Regeneration

" - end - Content = Content .. "
" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "
" - - -- SELECTING AREA - Content = Content .. "

Area:

Start X, Start Z; End X, End Z" - Content = Content .. "
" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "
" - - -- SELECTING RADIAL - Content = Content .. "

Radial:

Center X, Center Z, Radius" - Content = Content .. "
" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "
" - Content = Content .. "
" - Content = Content .. "
" - Content = Content .. "
" - - -- SELECTING POINT - Content = Content .. "

Point regeneration:

X, Z" - Content = Content .. "
" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "
" - - -- SELECTING PLAYERS - Content = Content .. "

Player-based regeneration:

" - Content = Content .. "" - local PlayerNum = 0 - local AddPlayerToTable = function( Player ) - PlayerNum = PlayerNum + 1 - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - Content = Content .. "" - end - if (cRoot:Get():GetWorld(WORK_WORLD) == nil) then - Content = Content .. "" - else - cRoot:Get():GetWorld(WORK_WORLD):ForEachPlayer( AddPlayerToTable ) - if( PlayerNum == 0 ) then - Content = Content .. "" - end - end - Content = Content .. "
" .. PlayerNum .. "." .. Player:GetName() .. "" .. Buttons_Player(Player:GetName()) .. "
Incorrect world selection
No connected players
" - Content = Content .. "
" - return Content -end \ No newline at end of file -- cgit v1.2.3 From ce11888851f7531d23db8aa10045b4babb9def88 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 8 Oct 2014 21:05:24 +0100 Subject: Added chunkWorx. --- MCServer/Plugins/ChunkWorx | 1 + 1 file changed, 1 insertion(+) create mode 160000 MCServer/Plugins/ChunkWorx (limited to 'MCServer') diff --git a/MCServer/Plugins/ChunkWorx b/MCServer/Plugins/ChunkWorx new file mode 160000 index 000000000..894c7e320 --- /dev/null +++ b/MCServer/Plugins/ChunkWorx @@ -0,0 +1 @@ +Subproject commit 894c7e32049e9d2a1e736f7d721aaacd1ae29e53 -- cgit v1.2.3 From 8f625867f72ea5865616a14c628a21d494bac27e Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 8 Oct 2014 21:07:55 +0100 Subject: Removed ChatLog. --- MCServer/Plugins/ChatLog/plugin.lua | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 MCServer/Plugins/ChatLog/plugin.lua (limited to 'MCServer') diff --git a/MCServer/Plugins/ChatLog/plugin.lua b/MCServer/Plugins/ChatLog/plugin.lua deleted file mode 100644 index adbf986e0..000000000 --- a/MCServer/Plugins/ChatLog/plugin.lua +++ /dev/null @@ -1,31 +0,0 @@ - --- plugin.lua - --- Implements the main entrypoint for the plugin, as well as all the handling needed - --- ChatLog plugin logs all chat messages into the server log - - - - - -function Initialize(Plugin) - Plugin:SetName("ChatLog") - Plugin:SetVersion(3) - - cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChat) - - LOG("Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion()) - return true -end - - - - - -function OnChat(Player, Message) - -- Lets get loggin' - LOGINFO("[" .. Player:GetName() .. "]: " .. StripColorCodes(Message)); - - return false -end \ No newline at end of file -- cgit v1.2.3 From 3b68949cc92d1b059516c4467faa7d648d802f50 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 8 Oct 2014 21:08:21 +0100 Subject: Added ChatLog --- MCServer/Plugins/ChatLog | 1 + 1 file changed, 1 insertion(+) create mode 160000 MCServer/Plugins/ChatLog (limited to 'MCServer') diff --git a/MCServer/Plugins/ChatLog b/MCServer/Plugins/ChatLog new file mode 160000 index 000000000..983d23ca3 --- /dev/null +++ b/MCServer/Plugins/ChatLog @@ -0,0 +1 @@ +Subproject commit 983d23ca37baa89f7e4dc11d71502d9c059f6376 -- cgit v1.2.3 From ccbd5ba6a2cf75cfa3a11e74464fc5943468127f Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 8 Oct 2014 21:11:09 +0100 Subject: Added Handy. --- MCServer/Plugins/Handy | 1 + MCServer/Plugins/Handy/handy.lua | 28 ---- MCServer/Plugins/Handy/handy_functions.lua | 216 ----------------------------- 3 files changed, 1 insertion(+), 244 deletions(-) create mode 160000 MCServer/Plugins/Handy delete mode 100644 MCServer/Plugins/Handy/handy.lua delete mode 100644 MCServer/Plugins/Handy/handy_functions.lua (limited to 'MCServer') diff --git a/MCServer/Plugins/Handy b/MCServer/Plugins/Handy new file mode 160000 index 000000000..e64a04be3 --- /dev/null +++ b/MCServer/Plugins/Handy @@ -0,0 +1 @@ +Subproject commit e64a04be39ac7790abcb09de3d4c7d8fc2a2a1e2 diff --git a/MCServer/Plugins/Handy/handy.lua b/MCServer/Plugins/Handy/handy.lua deleted file mode 100644 index e4e9d3f5f..000000000 --- a/MCServer/Plugins/Handy/handy.lua +++ /dev/null @@ -1,28 +0,0 @@ --- Global variables -PLUGIN = {} -- Reference to own plugin object -CHEST_WIDTH = 9 -HANDY_VERSION = 2 ---[[ - -Handy is a plugin for other plugins. It contain no commands, no hooks, but functions to ease plugins developers' life. - -API: - - -TODO: -1. GetChestSlot wrapper, so it will detect double chest neighbour chest and will be able to access it. -]] - -function Initialize(Plugin) - PLUGIN = Plugin - PLUGIN:SetName("Handy") - PLUGIN:SetVersion(HANDY_VERSION) - - PluginManager = cRoot:Get():GetPluginManager() - LOG("Initialized " .. PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion()) - return true -end - -function OnDisable() - LOG(PLUGIN:GetName() .. " v" .. PLUGIN:GetVersion() .. " is shutting down...") -end \ No newline at end of file diff --git a/MCServer/Plugins/Handy/handy_functions.lua b/MCServer/Plugins/Handy/handy_functions.lua deleted file mode 100644 index af43f663a..000000000 --- a/MCServer/Plugins/Handy/handy_functions.lua +++ /dev/null @@ -1,216 +0,0 @@ ---[[ -General stuff -]] --- Returns Handy plugin version number -function GetHandyVersion() - return HANDY_VERSION -end --- Checks if handy is in proper version -function CheckForRequiredVersion( inVersion ) - if( inVersion > HANDY_VERSION ) then return false end - return true -end ---[[ -MCS-specific _functions and nasty hacks :D -]] -function GetChestHeightCheat( inChest ) - local chestGrid = inChest:GetContents() - LOGINFO( "This function serves no purpose now! You should consider chest:GetContents():GetHeight() now!" ) - LOGINFO( "Also, you might find Handy's new 'IsChestDouble()' useful for your case" ) - return chestGrid:GetHeight() -end -function IsChestDouble( inChest ) - local chestHeight = inChest:GetContents():GetHeight() - if( chestHeight == 3 ) then - return false - end - return true -end --- Those two checks how many items of given inItemID chest and player have, and how much they could fit inside them -function ReadChestForItem( inChest, inItemID ) - return ReadGridForItems( inChest:GetContents(), inItemID ) -end -function ReadPlayerForItem( inPlayer, inItemID ) - local inventoryFound, inventoryFree = ReadGridForItems( inPlayer:GetInventory():GetInventoryGrid(), inItemID ) - local hotbarFound, hotbarFree = ReadGridForItems( inPlayer:GetInventory():GetHotbarGrid(), inItemID ) - local itemsFound = inventoryFound + hotbarFound - local freeSpace = inventoryFree + hotbarFree - return itemsFound, freeSpace -end --- Following functions are for chest-related operations --- BEWARE! Those assume you did checked if chest has items/space in it! -function ReadGridForItems( inGrid, inItemID ) - local itemsFound = 0 - local freeSpace = 0 - local slotsCount = inGrid:GetNumSlots() - local testerItem = cItem( inItemID ) - local maxStackSize = testerItem:GetMaxStackSize() - for index = 0, (slotsCount - 1) do - slotItem = inGrid:GetSlot( index ) - if( slotItem:IsEmpty() ) then - freeSpace = freeSpace + maxStackSize - else - if( slotItem:IsStackableWith( testerItem ) ) then - itemsFound = itemsFound + slotItem.m_ItemCount - freeSpace = maxStackSize - slotItem.m_ItemCount - end - end - end - return itemsFound, freeSpace -end - -function TakeItemsFromGrid( inGrid, inItem ) - local slotsCount = inGrid:GetNumSlots() - local removedItem = cItem( inItem ) - for index = 0, (slotsCount - 1) do - slotItem = inGrid:GetSlot( index ) - if( slotItem:IsSameType( removedItem ) ) then - if( slotItem.m_ItemCount <= removedItem.m_ItemCount ) then - removedItem.m_ItemCount = removedItem.m_ItemCount - slotItem.m_ItemCount - inGrid:EmptySlot( index ) - else - removedItem.m_ItemCount = slotItem.m_ItemCount - removedItem.m_ItemCount - inGrid:SetSlot( index, removedItem ) - removedItem.m_ItemCount = 0 - end - if( removedItem.m_ItemCount <= 0 ) then break end - end - end - return removedItem.m_ItemCount -end --------------- -function TakeItemsFromChest( inChest, inItemID, inAmount ) -- MIGHT BE UNSAFE! CHECK FOR ITEMS FIRST!! - local chestGrid = inChest:GetContents() - local removedItem = cItem( inItemID, inAmount ) - TakeItemsFromGrid( chestGrid, removedItem ) -end -function PutItemsToChest( inChest, inItemID, inAmount ) - local chestGrid = inChest:GetContents() - local addedItem = cItem( inItemID, inAmount ) - chestGrid:AddItem( addedItem ) -end --- Similar to chest-related. -function TakeItemsFromPlayer( inPlayer, inItemID, inAmount ) -- MIGHT BE UNSAFE! CHECK FIRST! - local removedItem = cItem( inItemID, inAmount ) - local inventoryGrid = inPlayer:GetInventory():GetInventoryGrid() - local hotbarGrid = inPlayer:GetInventory():GetHotbarGrid() - local itemsLeft = TakeItemsFromGrid( inventoryGrid, removedItem ) - if( itemsLeft > 0 ) then - removedItem = cItem( inItemID, itemsLeft ) - TakeItemsFromGrid( hotbarGrid, removedItem ) - end -end -function GiveItemsToPlayer( inPlayer, inItemID, inAmount ) - local addedItem = cItem( inItemID, inAmount ) - local inventoryGrid = inPlayer:GetInventory():GetInventoryGrid() - local hotbarGrid = inPlayer:GetInventory():GetHotbarGrid() - local itemsAdded = inventoryGrid:AddItem( addedItem ) - if( itemsAdded < inAmount ) then - addedItem.m_ItemCount = addedItem.m_ItemCount - itemsAdded - hotbarGrid:AddItem( addedItem ) - end -end --- This function returns item max stack for a given itemID. It uses vanilla max stack size, and uses several non-common items notations; --- Those are: --- oneonerecord( because aparently 11record wasn't the best idea in lua scripting application ) --- carrotonastick( because it wasn't added to items.txt yet ) --- waitrecord( for same reason ) --- Feel free to ignore the difference, or to add those to items.txt -function GetItemMaxStack( inItemID ) - local testerItem = cItem( inItemID ) - LOGINFO( "This function serves no real purpose now, maybe consider using cItem:GetMaxStackSize()?" ) - return testerItem:GetMaxStackSize() -end -function ItemIsArmor( inItemID, inCheckForHorseArmor ) - inCheckForHorseArmor = inCheckForHorseArmor or false - if( inItemID == E_ITEM_LEATHER_CAP ) then return true end - if( inItemID == E_ITEM_LEATHER_TUNIC ) then return true end - if( inItemID == E_ITEM_LEATHER_PANTS ) then return true end - if( inItemID == E_ITEM_LEATHER_BOOTS ) then return true end - - if( inItemID == E_ITEM_CHAIN_HELMET ) then return true end - if( inItemID == E_ITEM_CHAIN_CHESTPLATE ) then return true end - if( inItemID == E_ITEM_CHAIN_LEGGINGS ) then return true end - if( inItemID == E_ITEM_CHAIN_BOOTS ) then return true end - - if( inItemID == E_ITEM_IRON_HELMET ) then return true end - if( inItemID == E_ITEM_IRON_CHESTPLATE ) then return true end - if( inItemID == E_ITEM_IRON_LEGGINGS ) then return true end - if( inItemID == E_ITEM_IRON_BOOTS ) then return true end - - if( inItemID == E_ITEM_DIAMOND_HELMET ) then return true end - if( inItemID == E_ITEM_DIAMOND_CHESTPLATE ) then return true end - if( inItemID == E_ITEM_DIAMOND_LEGGINGS ) then return true end - if( inItemID == E_ITEM_DIAMOND_BOOTS ) then return true end - - if( inItemID == E_ITEM_GOLD_HELMET ) then return true end - if( inItemID == E_ITEM_GOLD_CHESTPLATE ) then return true end - if( inItemID == E_ITEM_GOLD_LEGGINGS ) then return true end - if( inItemID == E_ITEM_GOLD_BOOTS ) then return true end - - if( inCheckForHorseArmor ) then - if( inItemID == E_ITEM_IRON_HORSE_ARMOR ) then return true end - if( inItemID == E_ITEM_GOLD_HORSE_ARMOR ) then return true end - if( inItemID == E_ITEM_DIAMOND_HORSE_ARMOR ) then return true end - end - return false -end --- Returns full-length playername for a short name( usefull for parsing commands ) -function GetExactPlayername( inPlayerName ) - local _result = inPlayerName - local function SetProcessingPlayername( inPlayer ) - _result = inPlayer:GetName() - end - cRoot:Get():FindAndDoWithPlayer( inPlayerName, SetProcessingPlayername ) - return _result -end -function GetPlayerByName( inPlayerName ) - local _player - local PlayerSetter = function( Player ) - _player = Player - end - cRoot:Get():FindAndDoWithPlayer( inPlayerName, PlayerSetter ) - return _player -end ---[[ -Not-so-usual math _functions -]] --- Rounds floating point number. Because lua guys think this function doesn't deserve to be presented in lua's math -function round( inX ) - if( inX%2 ~= 0.5 ) then - return math.floor( inX + 0.5 ) - end - return inX - 0.5 -end ---[[ -Functions I use for filework and stringswork -]] -function PluralString( inValue, inSingularString, inPluralString ) - local _value_string = tostring( inValue ) - if( _value_string[#_value_string] == "1" ) then - return inSingularString - end - return inPluralString -end -function PluralItemName( inItemID, inAmount ) -- BEWARE! TEMPORAL SOLUTION THERE! :D - local _value_string = tostring( inValue ) - local _name = "" - if( _value_string[#_value_string] == "1" ) then - -- singular names - _name = ItemTypeToString( inItemID ) - else - -- plural names - _name = ItemTypeToString( inItemID ).."s" - end - return _name -end --- for filewriting purposes. 0 = false, 1 = true -function StringToBool( inValue ) - if( inValue == "1" ) then return true end - return false -end --- same, but reversal -function BoolToString( inValue ) - if( inValue == true ) then return 1 end - return 0 -end -- cgit v1.2.3 From 27e69f32c6e72ada6741f0b866c1afbc7ba00bc0 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 8 Oct 2014 21:13:10 +0100 Subject: Removed MagicCarpet --- MCServer/Plugins/MagicCarpet/objects.lua | 97 -------------------------------- MCServer/Plugins/MagicCarpet/plugin.lua | 81 -------------------------- 2 files changed, 178 deletions(-) delete mode 100644 MCServer/Plugins/MagicCarpet/objects.lua delete mode 100644 MCServer/Plugins/MagicCarpet/plugin.lua (limited to 'MCServer') diff --git a/MCServer/Plugins/MagicCarpet/objects.lua b/MCServer/Plugins/MagicCarpet/objects.lua deleted file mode 100644 index 8d81623a5..000000000 --- a/MCServer/Plugins/MagicCarpet/objects.lua +++ /dev/null @@ -1,97 +0,0 @@ --- Location object -cLocation = {} -function cLocation:new( x, y, z ) - local object = { x = x, y = y, z = z } - setmetatable(object, { __index = cLocation }) - return object -end - --- Offsets -cFibers = { } -function cFibers:new() - local object = { - cLocation:new( 2, -1, 2 ), - cLocation:new( 2, -1, 1 ), - cLocation:new( 2, -1, 0 ), - cLocation:new( 2, -1, -1 ), - cLocation:new( 2, -1, -2 ), - cLocation:new( 1, -1, 2 ), - cLocation:new( 1, -1, 1 ), - cLocation:new( 1, -1, 0 ), - cLocation:new( 1, -1, -1 ), - cLocation:new( 1, -1, -2 ), - cLocation:new( 0, -1, 2 ), - cLocation:new( 0, -1, 1 ), - cLocation:new( 0, -1, 0 ), - cLocation:new( 0, -1, -1 ), - cLocation:new( 0, -1, -2 ), - cLocation:new( -1, -1, 2 ), - cLocation:new( -1, -1, 1 ), - cLocation:new( -1, -1, 0 ), - cLocation:new( -1, -1, -1 ), - cLocation:new( -1, -1, -2 ), - cLocation:new( -2, -1, 2 ), - cLocation:new( -2, -1, 1 ), - cLocation:new( -2, -1, 0 ), - cLocation:new( -2, -1, -1 ), - cLocation:new( -2, -1, -2 ), - imadeit = false, - } - setmetatable(object, { __index = cFibers }) - return object; -end - --- Carpet object -cCarpet = {} -function cCarpet:new() - local object = { Location = cLocation:new(0,0,0), - Fibers = cFibers:new(), - } - setmetatable(object, { __index = cCarpet }) - return object -end - -function cCarpet:remove() - local World = cRoot:Get():GetDefaultWorld() - for i, fib in ipairs( self.Fibers ) do - local x = self.Location.x + fib.x - local y = self.Location.y + fib.y - local z = self.Location.z + fib.z - local BlockID = World:GetBlock( x, y, z ) - if( fib.imadeit == true and BlockID == E_BLOCK_GLASS ) then - World:SetBlock( x, y, z, 0, 0 ) - fib.imadeit = false - end - end -end - -function cCarpet:draw() - local World = cRoot:Get():GetDefaultWorld() - for i, fib in ipairs( self.Fibers ) do - local x = self.Location.x + fib.x - local y = self.Location.y + fib.y - local z = self.Location.z + fib.z - local BlockID = World:GetBlock( x, y, z ) - if( BlockID == 0 ) then - fib.imadeit = true - World:SetBlock( x, y, z, E_BLOCK_GLASS, 0 ) - else - fib.imadeit = false - end - end -end - -function cCarpet:moveTo( NewPos ) - local x = math.floor( NewPos.x ) - local y = math.floor( NewPos.y ) - local z = math.floor( NewPos.z ) - if( self.Location.x ~= x or self.Location.y ~= y or self.Location.z ~= z ) then - self:remove() - self.Location = cLocation:new( x, y, z ) - self:draw() - end -end - -function cCarpet:getY() - return self.Location.y -end \ No newline at end of file diff --git a/MCServer/Plugins/MagicCarpet/plugin.lua b/MCServer/Plugins/MagicCarpet/plugin.lua deleted file mode 100644 index 417ea0e02..000000000 --- a/MCServer/Plugins/MagicCarpet/plugin.lua +++ /dev/null @@ -1,81 +0,0 @@ -local Carpets = {} -local PLUGIN - -function Initialize( Plugin ) - Plugin:SetName( "MagicCarpet" ) - Plugin:SetVersion( 2 ) - - cPluginManager.AddHook(cPluginManager.HOOK_PLAYER_MOVING, OnPlayerMoving) - cPluginManager.AddHook(cPluginManager.HOOK_PLAYER_DESTROYED, OnDisconnect) - - local PluginManager = cPluginManager:Get() - PluginManager:BindCommand("/mc", "magiccarpet", HandleCarpetCommand, " - Spawns a magical carpet"); - - PLUGIN = Plugin - - LOG( "Initialised " .. Plugin:GetName() .. " v." .. Plugin:GetVersion() ) - return true -end - - - - - -function OnDisable() - LOG( PLUGIN:GetName() .. " v." .. PLUGIN:GetVersion() .. " is shutting down..." ) - for i, Carpet in pairs( Carpets ) do - Carpet:remove() - end -end - - - - - -function HandleCarpetCommand( Split, Player ) - Carpet = Carpets[ Player ] - - if( Carpet == nil ) then - Carpets[ Player ] = cCarpet:new() - Player:SendMessageSuccess("You're on a magic carpet!") - Player:SendMessageInfo("Look straight down to descend. Jump to ascend.") - else - Carpet:remove() - Carpets[ Player ] = nil - Player:SendMessageSuccess("The carpet vanished!") - end - - return true -end - - - - - -function OnDisconnect( Reason, Player ) - local Carpet = Carpets[ Player ] - if( Carpet ~= nil ) then - Carpet:remove() - end - Carpets[ Player ] = nil -end - - - - - -function OnPlayerMoving(Player) - local Carpet = Carpets[ Player ] - if( Carpet == nil ) then - return - end - - if( Player:GetPitch() == 90 ) then - Carpet:moveTo( cLocation:new( Player:GetPosX(), Player:GetPosY() - 1, Player:GetPosZ() ) ) - else - if( Player:GetPosY() < Carpet:getY() ) then - Player:TeleportToCoords(Player:GetPosX(), Carpet:getY() + 0.2, Player:GetPosZ()) - end - Carpet:moveTo( cLocation:new( Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() ) ) - end -end -- cgit v1.2.3 From fa00cbeda3729c072e3594b137ee00b298d5f120 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 8 Oct 2014 21:13:38 +0100 Subject: Added MagicCarpet --- MCServer/Plugins/MagicCarpet | 1 + 1 file changed, 1 insertion(+) create mode 160000 MCServer/Plugins/MagicCarpet (limited to 'MCServer') diff --git a/MCServer/Plugins/MagicCarpet b/MCServer/Plugins/MagicCarpet new file mode 160000 index 000000000..493f2dfa6 --- /dev/null +++ b/MCServer/Plugins/MagicCarpet @@ -0,0 +1 @@ +Subproject commit 493f2dfa6d39f134e37c4c614cf8d6ffd10c825f -- cgit v1.2.3 From d3f31b5046ebd2dacfcbeb96f900e12d2bddcad9 Mon Sep 17 00:00:00 2001 From: win32re Date: Sat, 11 Oct 2014 17:40:33 +0200 Subject: Update template.html --- MCServer/webadmin/template.html | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/template.html b/MCServer/webadmin/template.html index 822f73857..50eaa486b 100644 --- a/MCServer/webadmin/template.html +++ b/MCServer/webadmin/template.html @@ -51,7 +51,7 @@ table { border-top: 1px solid #ddd; width: 700px; - } + } table tr th { text-align: left; @@ -71,17 +71,23 @@ border: 1px solid #ddd; border-radius: 3px; } - #main table tr.odd td { + + #main table tr.odd td { background: #fbfbfb; } - table tr:hover td { background: #fdfcf6; } + table tr:hover td { + background: #fdfcf6; + } + table .action { text-align: right; padding: 0 20px 0 10px; } - table tr .action a { color: #9b9b9b; } + table tr .action a { + color: #9b9b9b; + } #cssmenu{ height:10px; display:table; padding:0; margin: 0 auto; border:1px #707070 solid; border-radius:5px; } #cssmenu > ul {list-style:inside none; padding:0; margin:0;} -- cgit v1.2.3 From 9bb2b43e9e6994f247659ee48b2225c456f1dde5 Mon Sep 17 00:00:00 2001 From: win32re Date: Sat, 11 Oct 2014 17:57:56 +0200 Subject: More template changes. --- MCServer/webadmin/template.html | 261 ++++++++++++++++++++-------------------- 1 file changed, 130 insertions(+), 131 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/template.html b/MCServer/webadmin/template.html index 50eaa486b..addc1806c 100644 --- a/MCServer/webadmin/template.html +++ b/MCServer/webadmin/template.html @@ -1,135 +1,134 @@ - - {TITLE} | {PLUGIN_NAME} - - - - - - - -
- Login: {USERNAME}
-
- -
- -
- {CONTENT} -
-

MCServer is using {MEM}MB of memory, with {NUMCHUNKS} chunks loaded.

Web Design by Tiger

-
- + footer { + font-family: helvetica; + font-size: 10px; + text-align: center; + border-top: 1px #000 dotted; + padding: 1px 0px 1px 0px; + } + + table { + border-collapse: collapse; + border-spacing: 10; + } + + table { + border-top: 1px solid #ddd; + width: 700px; + } + + table tr th { + text-align: left; + background: #f6f6f6; + padding: 0px 20px; + height: 25px; + line-height: 25px; + border: 1px solid #ddd; + border-radius: 3px; + } + + table tr td { + background: #f6f6f6; + padding: 0px 20px; + height: 29px; + line-height: 29px; + border: 1px solid #ddd; + border-radius: 3px; + } + + #main table tr.odd td { + background: #fbfbfb; + } + + table tr:hover td { + background: #fdfcf6; + } + + table .action { + text-align: right; + padding: 0 20px 0 10px; + } + + table tr .action a { + color: #9b9b9b; + } + + #cssmenu{ height:10px; display:table; padding:0; margin: 0 auto; border:1px #707070 solid; border-radius:5px; } + #cssmenu > ul {list-style:inside none; padding:0; margin:0;} + #cssmenu > ul > li {list-style:inside none; padding:0; margin:0; float:left; display:block; position:relative;} + #cssmenu > ul > li > a{ outline:none; display:block; position:relative; color:#E8E8E8; padding:10px 10px; font:bold 13px/100% Arial, Helvetica, sans-serif; text-align:center; text-decoration:none; text-shadow:1px 1px 0 rgba(0,0,0, 0.4); } + #cssmenu > ul > li:first-child > a{border-radius:5px 0 0 5px;} + /* #cssmenu > ul > li > a:after{ content:''; position:absolute; border-right:1px solid #FFFFFF; top:-1px; bottom:-1px; right:-2px; z-index:99; } */ + #cssmenu ul li.has-sub:hover > a:after{top:0; bottom:0;} + #cssmenu > ul > li.has-sub > a:before{ content:''; position:absolute; top:18px; right:6px; border:5px solid transparent; border-top:5px solid #707070; } + #cssmenu > ul > li.has-sub:hover > a:before{top:19px;} + #cssmenu ul li.has-sub:hover > a{ background:#3f3f3f; border-color:#707070; padding-bottom:13px; padding-top:13px; top:-1px; z-index:999; } + #cssmenu ul li.has-sub:hover > ul, #cssmenu ul li.has-sub:hover > div{display:block;} + #cssmenu ul li.has-sub > a:hover{background:#3f3f3f; border-color:#3f3f3f;} + #cssmenu ul li > ul, #cssmenu ul li > div{ display:none; width:auto; position:absolute; top:38px; padding:10px 0; background:#3f3f3f; border-radius:0 0 5px 5px; z-index:999; } + #cssmenu ul li > ul{width:200px;} + #cssmenu ul li > ul li{display:block; list-style:inside none; padding:0; margin:0; position:relative;} + #cssmenu ul li > ul li a{ outline:none; display:block; position:relative; margin:0; padding:8px 20px; font:10pt Arial, Helvetica, sans-serif; color:#fff; text-decoration:none; text-shadow:1px 1px 0 rgba(0,0,0, 0.5); } + #cssmenu, #cssmenu > ul > li > ul > li a:hover{ background:#C8C8C8;} + #cssmenu > ul > li > a { border-right:1px solid #707070; color:#FFFFFF; } + #cssmenu > ul > li > a:after { border-color:#707070; } + #cssmenu > ul > li > a:hover { background:#B8B8B8; } + + + + + + +
+ Login: {USERNAME}
+
+ +
+ +
+ {CONTENT} +
+

MCServer is using {MEM}MB of memory, with {NUMCHUNKS} chunks loaded.

Web Design by Tiger

+
+ -- cgit v1.2.3 From 59efc7cfd26e3165fde727b4651650054402bae3 Mon Sep 17 00:00:00 2001 From: win32re Date: Sat, 11 Oct 2014 18:07:10 +0200 Subject: Fixed indentation. --- MCServer/webadmin/template.html | 261 ++++++++++++++++++++-------------------- 1 file changed, 131 insertions(+), 130 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/template.html b/MCServer/webadmin/template.html index addc1806c..53037be0d 100644 --- a/MCServer/webadmin/template.html +++ b/MCServer/webadmin/template.html @@ -1,134 +1,135 @@ - - {TITLE} | {PLUGIN_NAME} - - - - - - -
- Login: {USERNAME}
-
- -
- -
- {CONTENT} -
-

MCServer is using {MEM}MB of memory, with {NUMCHUNKS} chunks loaded.

Web Design by Tiger

-
- + #maincontent { + padding: 0px 25px 10px 25px; + } + + #wrapper { + min-width: 850px; + width: 75%; + margin: 10px auto; + background-color: white; + border: 4px #888888 solid; + border-radius: 10px; + font-family: Calibri, Trebuchet MS; + } + + header { + text-align:center; + padding: 10px; 0px; + } + + span { + text-align: right; + float: right; + border-left: 2px #C8C8C8 solid; + border-bottom: 2px #C8C8C8 solid; + padding: 2px 10px; + } + + footer { + font-family: helvetica; + font-size: 10px; + text-align: center; + border-top: 1px #000 dotted; + padding: 1px 0px 1px 0px; + } + + table { + border-collapse: collapse; + border-spacing: 10; + } + + table { + border-top: 1px solid #ddd; + width: 700px; + } + + table tr th { + text-align: left; + background: #f6f6f6; + padding: 0px 20px; + height: 25px; + line-height: 25px; + border: 1px solid #ddd; + border-radius: 3px; + } + + table tr td { + background: #f6f6f6; + padding: 0px 20px; + height: 29px; + line-height: 29px; + border: 1px solid #ddd; + border-radius: 3px; + } + + #main table tr.odd td { + background: #fbfbfb; + } + + table tr:hover td { + background: #fdfcf6; + } + + table .action { + text-align: right; + padding: 0 20px 0 10px; + } + + table tr .action a { + color: #9b9b9b; + } + + #cssmenu{ height:10px; display:table; padding:0; margin: 0 auto; border:1px #707070 solid; border-radius:5px; } + #cssmenu > ul {list-style:inside none; padding:0; margin:0;} + #cssmenu > ul > li {list-style:inside none; padding:0; margin:0; float:left; display:block; position:relative;} + #cssmenu > ul > li > a{ outline:none; display:block; position:relative; color:#E8E8E8; padding:10px 10px; font:bold 13px/100% Arial, Helvetica, sans-serif; text-align:center; text-decoration:none; text-shadow:1px 1px 0 rgba(0,0,0, 0.4); } + #cssmenu > ul > li:first-child > a{border-radius:5px 0 0 5px;} + /* #cssmenu > ul > li > a:after{ content:''; position:absolute; border-right:1px solid #FFFFFF; top:-1px; bottom:-1px; right:-2px; z-index:99; } */ + #cssmenu ul li.has-sub:hover > a:after{top:0; bottom:0;} + #cssmenu > ul > li.has-sub > a:before{ content:''; position:absolute; top:18px; right:6px; border:5px solid transparent; border-top:5px solid #707070; } + #cssmenu > ul > li.has-sub:hover > a:before{top:19px;} + #cssmenu ul li.has-sub:hover > a{ background:#3f3f3f; border-color:#707070; padding-bottom:13px; padding-top:13px; top:-1px; z-index:999; } + #cssmenu ul li.has-sub:hover > ul, #cssmenu ul li.has-sub:hover > div{display:block;} + #cssmenu ul li.has-sub > a:hover{background:#3f3f3f; border-color:#3f3f3f;} + #cssmenu ul li > ul, #cssmenu ul li > div{ display:none; width:auto; position:absolute; top:38px; padding:10px 0; background:#3f3f3f; border-radius:0 0 5px 5px; z-index:999; } + #cssmenu ul li > ul{width:200px;} + #cssmenu ul li > ul li{display:block; list-style:inside none; padding:0; margin:0; position:relative;} + #cssmenu ul li > ul li a{ outline:none; display:block; position:relative; margin:0; padding:8px 20px; font:10pt Arial, Helvetica, sans-serif; color:#fff; text-decoration:none; text-shadow:1px 1px 0 rgba(0,0,0, 0.5); } + #cssmenu, #cssmenu > ul > li > ul > li a:hover{ background:#C8C8C8;} + #cssmenu > ul > li > a { border-right:1px solid #707070; color:#FFFFFF; } + #cssmenu > ul > li > a:after { border-color:#707070; } + #cssmenu > ul > li > a:hover { background:#B8B8B8; } + + + + + + +
+ Login: {USERNAME} +
+
+ +
+ +
+ {CONTENT} +
+

MCServer is using {MEM}MB of memory, with {NUMCHUNKS} chunks loaded.

Web Design by Tiger

+
+ -- cgit v1.2.3 From 0c4894b99ebf8a679a744424452e901e2ef8a8d3 Mon Sep 17 00:00:00 2001 From: win32re Date: Sat, 11 Oct 2014 18:11:56 +0200 Subject: Update template.html --- MCServer/webadmin/template.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/template.html b/MCServer/webadmin/template.html index 53037be0d..e0c7e3597 100644 --- a/MCServer/webadmin/template.html +++ b/MCServer/webadmin/template.html @@ -116,10 +116,12 @@
- Login: {USERNAME} + + Login: {USERNAME} +
- +
-- cgit v1.2.3 From d9a50dd2eeec80f197b6024b2293d2a71060bc85 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 11 Oct 2014 17:15:38 +0100 Subject: Fixed remaining indent and replaced tiger with webfreak. --- MCServer/webadmin/template.html | 214 ++++++++++++++++++++-------------------- 1 file changed, 107 insertions(+), 107 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/template.html b/MCServer/webadmin/template.html index e0c7e3597..8bfcc0fbe 100644 --- a/MCServer/webadmin/template.html +++ b/MCServer/webadmin/template.html @@ -3,112 +3,112 @@ {TITLE} | {PLUGIN_NAME} @@ -133,7 +133,7 @@

MCServer is using {MEM}MB of memory, with {NUMCHUNKS} chunks loaded.

-

Web Design by Tiger

+

Web Design by

-- cgit v1.2.3 From 20dfd9ba3e832a369696c3a28caa62024dc9e0ba Mon Sep 17 00:00:00 2001 From: archshift Date: Sat, 11 Oct 2014 13:36:43 -0700 Subject: Webadmin: use images already in files/ instead of inline image data This also probably means that the browser will be able to cache the images better, and not have to repeatedly download them al a part of the HTML. --- MCServer/webadmin/(original).html | 8 ++++---- MCServer/webadmin/template.html | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/(original).html b/MCServer/webadmin/(original).html index 239a255e5..673a93ada 100644 --- a/MCServer/webadmin/(original).html +++ b/MCServer/webadmin/(original).html @@ -1,7 +1,7 @@ - + {TITLE} -
- -

MCServer - WebAdmin

-
- -
-
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + +
+
+ Welcome Guest +
+
+
+ +
+
+
+
+
+
- + \ No newline at end of file diff --git a/MCServer/webadmin/temp.html b/MCServer/webadmin/temp.html new file mode 100644 index 000000000..697bf6276 --- /dev/null +++ b/MCServer/webadmin/temp.html @@ -0,0 +1,100 @@ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Menu
User CP Home
+
[-]
+
Messenger
+
Compose
+ + + + +
Tracking
Edit Folders
+
[-]
+
Your Profile
+
+ + + + + + + + +
Edit Options
+
[-]
+
Miscellaneous
+
Group Memberships
Buddy/Ignore List
Manage Attachments
Saved Drafts
Subscribed Threads
Forum Subscriptions
View Profile
+
+ + + + + + + + + + +
Your Account Summary
ambushed01
+ ambushed01
+ Posts: 25 (4.3 per day | 0.16 percent of total posts)
+ + Reputation: 0 [Details]
+ + Email: arianroeloffzen@gmail.com
+ Registration Date: 10-10-2014, 09:07 PM
+ Primary User Group: Registered
+ + Members Referred: 0
+
To refer a member to this board, direct them to http://forum.mc-server.org/member.php?action=register&referrer=2273 + +
+
\ No newline at end of file diff --git a/MCServer/webadmin/template.html b/MCServer/webadmin/template.html index b0864e35d..822f73857 100644 --- a/MCServer/webadmin/template.html +++ b/MCServer/webadmin/template.html @@ -1,140 +1,129 @@ - - {TITLE} | {PLUGIN_NAME} - - - - - - -
- - Login: {USERNAME} - -
-
- -
- -
- {CONTENT} -
-
-

MCServer is using {MEM}MB of memory, with {NUMCHUNKS} chunks loaded.

-

Web Design by

-
+ + {TITLE} | {PLUGIN_NAME} + + + + + + + +
+ Login: {USERNAME}
+
+ +
+ +
+ {CONTENT}
- +

MCServer is using {MEM}MB of memory, with {NUMCHUNKS} chunks loaded.

Web Design by Tiger

+
+ diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua index 84a50b055..1b2f18246 100644 --- a/MCServer/webadmin/template.lua +++ b/MCServer/webadmin/template.lua @@ -23,30 +23,11 @@ end function GetDefaultPage() local PM = cRoot:Get():GetPluginManager() - local SubTitle = "Current Game" + local SubTitle = "Home" local Content = "" - Content = Content .. "

Server Name:

" - Content = Content .. "

" .. cRoot:Get():GetServer():GetServerID() .. "

" + Content = Content .. "

Home Home Home

    I have no idea what this content should do.
" - Content = Content .. "

Plugins:

    " - local AllPlugins = PM:GetAllPlugins() - for key,value in pairs(AllPlugins) do - if( value ~= nil and value ~= false ) then - Content = Content .. "
  • " .. key .. " V." .. value:GetVersion() .. "
  • " - end - end - - Content = Content .. "
" - Content = Content .. "

Players:

    " - - local AddPlayerToTable = function( Player ) - Content = Content .. "
  • " .. Player:GetName() .. "
  • " - end - cRoot:Get():ForEachPlayer( AddPlayerToTable ) - - Content = Content .. "

"; - return Content, SubTitle end @@ -83,20 +64,47 @@ function ShowPage(WebAdmin, TemplateRequest) Output([[ - - -]] .. Title .. [[ - - + ]] .. Title .. [[ + + + + + -
-
- MCServer -
- + ]]) -- cgit v1.2.3 From 8d941212edaba3635e9d558f6c4a27e603b905ef Mon Sep 17 00:00:00 2001 From: Ambushed91 Date: Thu, 23 Oct 2014 20:55:49 +0200 Subject: Update guest.html --- MCServer/webadmin/files/guest.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/guest.html b/MCServer/webadmin/files/guest.html index 28c3cdbf9..1230a8c01 100644 --- a/MCServer/webadmin/files/guest.html +++ b/MCServer/webadmin/files/guest.html @@ -2,4 +2,4 @@ Hello Admin, this is a welcome message. You will see this because you didn't cha To change the welcome message go to file: files/guest.html and change it!.

-This file is using html, for more information see: http://www.w3schools.com \ No newline at end of file +This file is written in HTML, for more information see: http://www.w3schools.com -- cgit v1.2.3 From 811c10625ab49b84a2e914ab8766bbbb0b303512 Mon Sep 17 00:00:00 2001 From: Ambushed91 Date: Thu, 23 Oct 2014 20:59:00 +0200 Subject: Update style.css --- MCServer/webadmin/files/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/style.css b/MCServer/webadmin/files/style.css index dfdbe4559..12db60a9f 100644 --- a/MCServer/webadmin/files/style.css +++ b/MCServer/webadmin/files/style.css @@ -1021,4 +1021,4 @@ button:disabled, input:disabled{ border:none!important; color:#fff!important; background-color:#ccc!important; -} \ No newline at end of file +} -- cgit v1.2.3 From 1c58137ef0b46eb1ecdbdca6ff68203c7ef3f092 Mon Sep 17 00:00:00 2001 From: Ambushed91 Date: Thu, 23 Oct 2014 21:02:02 +0200 Subject: Update (original).html --- MCServer/webadmin/(original).html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/(original).html b/MCServer/webadmin/(original).html index 239a255e5..673a93ada 100644 --- a/MCServer/webadmin/(original).html +++ b/MCServer/webadmin/(original).html @@ -1,7 +1,7 @@ - + {TITLE} - - - - - - -
- Login: {USERNAME}
-
- -
- -
- {CONTENT} + + {TITLE} | {PLUGIN_NAME} + + + + + + +
+ + Login: {USERNAME} + +
+
+ +
+ +
+ {CONTENT} +
+
+

MCServer is using {MEM}MB of memory, with {NUMCHUNKS} chunks loaded.

+

Web Design by

+
-

MCServer is using {MEM}MB of memory, with {NUMCHUNKS} chunks loaded.

Web Design by Tiger

-
- + -- cgit v1.2.3 From bc1a98b2db6de29826ab8bd0282671fbc9eb13b8 Mon Sep 17 00:00:00 2001 From: Ambushed91 Date: Mon, 27 Oct 2014 18:45:41 +0100 Subject: Update template.lua Removed FusionCare link, change position for "Current time JS", Compression Ratio: 31% (HTML) --- MCServer/webadmin/template.lua | 165 +++++++++++++++++++---------------------- 1 file changed, 75 insertions(+), 90 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua index fe04c00ca..baca461b0 100644 --- a/MCServer/webadmin/template.lua +++ b/MCServer/webadmin/template.lua @@ -64,47 +64,44 @@ function ShowPage(WebAdmin, TemplateRequest) Output([[ - ]] .. Title .. [[ - - - - +]] .. Title .. [[ + + + + - -
-
-
-
- -
-
-
-
-
- -
Welcome back, ]] .. TemplateRequest.Request.Username .. [[
-
-
-
-
-
-
- - - - + + +
- - - - - - - - -
Menu
Home
Server Management
+
+
+
+
+ +
+
+
+
+
+ +
Welcome back, ]] .. TemplateRequest.Request.Username .. [[
+
+
+
+
+
+
+ + + - - - -
+ + + + + + + + -
Menu
Home
Server Management
]]) @@ -125,57 +122,45 @@ function ShowPage(WebAdmin, TemplateRequest) Output([[
-
- - - - - - - -
]] .. SubTitle .. [[
- ]] .. PageContent .. [[ -
-
-
-
-
- - - - +
+
+ + + + + + + +
]] .. SubTitle .. [[
+]] .. PageContent .. [[ +
+
+
+
+
+ + ]]) return table.concat(SiteContent) -- cgit v1.2.3 From d0a47d9273d7254c82fb5c780ef28c58c1d1e306 Mon Sep 17 00:00:00 2001 From: Ambushed91 Date: Mon, 27 Oct 2014 19:13:25 +0100 Subject: Update template.lua --- MCServer/webadmin/template.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua index baca461b0..d6ac2e94c 100644 --- a/MCServer/webadmin/template.lua +++ b/MCServer/webadmin/template.lua @@ -82,9 +82,11 @@ function ShowPage(WebAdmin, TemplateRequest)
-
Welcome back, ]] .. TemplateRequest.Request.Username .. [[
+
Welcome back, ]] .. TemplateRequest.Request.Username .. [[    Log Out
@@ -101,7 +103,7 @@ function ShowPage(WebAdmin, TemplateRequest) Home -
Server Management
+
Server Management
]]) @@ -145,9 +147,11 @@ function ShowPage(WebAdmin, TemplateRequest) -- cgit v1.2.3 From 1aef54e79339adb7bf7aa0d607cf7c8ab6639c41 Mon Sep 17 00:00:00 2001 From: Arian Date: Mon, 27 Oct 2014 19:30:37 +0100 Subject: Update login.css Added licence --- MCServer/webadmin/files/login.css | 1 + 1 file changed, 1 insertion(+) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/login.css b/MCServer/webadmin/files/login.css index e3c7add74..3a766e1b6 100644 --- a/MCServer/webadmin/files/login.css +++ b/MCServer/webadmin/files/login.css @@ -1 +1,2 @@ +/* Copyright Justin S and MCServer Team, licensed under CC-BY-SA 3.0 */ *{margin:0}body{font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;-webkit-font-smoothing:antialiased;background:#fff url(header.png) repeat-x top left;width:100%;min-width:100%;overflow:hidden}a:link{color:#555;text-decoration:none}a:visited{color:#444;text-decoration:none}a:hover,a:active{color:#000;text-decoration:underline}img{border:none}h1{color:#069}.row1{border-bottom:1px solid #000;height:100px;max-height:100px}.row2{margin:0 auto;text-align:center;vertical-align:middle}.contention{color:#000;text-align:left;line-height:1.4;margin:0;font-family:Tahoma,Verdana,Arial,Sans-Serif;font-size:13px}button{background:#fff;color:#000;border:1px solid #ccc;padding:3px;font-family:Tahoma,Verdana,Arial,Sans-Serif;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin:-3px 0}button:hover{border-top-color:#28597a;background:#28597a;color:#ccc}button:active{border-top-color:#1b435e;background:#1b435e}.push10{padding-bottom:75px}#panel .upper{background:#dcdbdc url(tcat.png) repeat-x;border-top:1px solid #fff;border-bottom:1px solid #bbb;padding:7px}#footer{z-index:99999}#footer ul.menu{margin:0;padding:0;list-style:none}#footer ul.menu li{margin:0 5px;display:inline}#footer .upper{background:#dcdbdc url(tcat.png) repeat-x;border-top:1px solid #bbb;padding:6px;overflow:hidden;font-size:12px}#footer .upper ul.bottom_links{float:left;margin:3px 0 0 -5px}#footer .lower{background:#a1a2a2 url(thead.png) top left repeat-x;color:#fff;border-top:1px solid #ccc;border-bottom:1px solid #ddd;overflow:hidden;padding:8px;font-size:11px}#footer .lower a:link,#footer .lower a:visited{color:#fff;font-weight:700}#footer .lower a:hover,#footer .lower a:active{color:#fff;font-weight:700}#footer .lower #current_time{float:right;padding-right:6px}.wrapper{width:85%;min-width:970px;max-width:1500px;margin:auto}#footer{position:fixed;left:0;bottom:0;height:60px;width:100%;background:#999;border-top:1px #000 solid}* html #footer{position:absolute;top:expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px')}tr td.trow2:first-child{border-left:0}tr td.trow2:last-child{border-right:0}.tborder{-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px}.thead,.rounded_top{-moz-border-radius-topleft:6px;-moz-border-radius-topright:6px;-webkit-border-top-left-radius:6px;-webkit-border-top-right-radius:6px;border-top-left-radius:6px;border-top-right-radius:6px}table{color:#000;font-size:13px}.tborder{background:#fff;width:100%;margin:auto;border:1px solid #ccc;padding:1px}.thead{background:#a1a2a2 url(thead.png) top left repeat-x;color:#fff;border-bottom:1px solid #8e8f8f;padding:8px}.trow2{background:#efefef;border:1px solid;border-color:#fff #ddd #ddd #fff}.padtopp{padding-top:25px} -- cgit v1.2.3 From 9c002dc0c896005bf7713ccc7a68a8fa585ad8d9 Mon Sep 17 00:00:00 2001 From: Arian Date: Mon, 27 Oct 2014 19:31:06 +0100 Subject: Update style.css Added licence --- MCServer/webadmin/files/style.css | 1 + 1 file changed, 1 insertion(+) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/style.css b/MCServer/webadmin/files/style.css index fad1a5df4..4c38af695 100644 --- a/MCServer/webadmin/files/style.css +++ b/MCServer/webadmin/files/style.css @@ -1 +1,2 @@ +/* Copyright Justin S and MCServer Team, licensed under CC-BY-SA 3.0 */ *{margin:0}body{font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;-webkit-font-smoothing:antialiased;background:#fff;width:100%;min-width:100%;overflow-y:scroll;overflow-x:hidden}a:link{color:#555;text-decoration:none}a:visited{color:#444;text-decoration:none}a:hover,a:active{color:#000;text-decoration:underline}img{border:none}h1{color:#069;text-shadow:2px 2px #000}.row1{border-bottom:1px #000 solid;height:100px;max-height:100px;background:#fff url(header.png) repeat-x top left}.row2{margin:0 auto;text-align:center;vertical-align:middle;margin-top:125px}.contention{color:#000;text-align:left;line-height:1.4;margin:0;font-family:Tahoma,Verdana,Arial,Sans-Serif;font-size:13px}.push10{padding-bottom:75px}#panel ul.menu{margin:0;padding:0;list-style:none}#panel ul.menu li{margin:0 5px;display:inline}#panel ul.menu li a{padding-left:20px;background-repeat:no-repeat;background-position:left center}#panel .upper ul.top_links{float:right;font-weight:700}#panel .upper{background:#dcdbdc url(tcat.png) repeat-x;border-top:1px solid #fff;border-bottom:1px solid #bbb;padding:7px}#footer{z-index:99999}#footer ul.menu{margin:0;padding:0;list-style:none}#footer ul.menu li{margin:0 5px;display:inline}#footer .upper{background:#dcdbdc url(tcat.png) repeat-x;border-top:1px solid #bbb;padding:6px;overflow:hidden;font-size:12px}#footer .upper ul.bottom_links{float:left;margin:3px 0 0 -5px}#footer .lower{background:#a1a2a2 url(thead.png) top left repeat-x;color:#fff;border-top:1px solid #ccc;border-bottom:1px solid #ddd;overflow:hidden;padding:8px;font-size:11px}#footer .lower a:link,#footer .lower a:visited{color:#fff;font-weight:700}#footer .lower a:hover,#footer .lower a:active{color:#fff;font-weight:700}#footer .lower #current_time{float:right;padding-right:6px}.wrapper{width:85%;min-width:970px;max-width:1500px;margin:auto}#footer{position:fixed;left:0;bottom:0;height:60px;width:100%;background:#999;border-top:1px #000 solid}* html #footer{position:absolute;top:expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px')}tr td.trow1:first-child,tr td.trow2:first-child{border-left:0}tr td.trow1:last-child,tr td.trow2:last-child{border-right:0}.tborder{-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px}.thead{-moz-border-radius-topleft:6px;-moz-border-radius-topright:6px;-webkit-border-top-left-radius:6px;-webkit-border-top-right-radius:6px;border-top-left-radius:6px;border-top-right-radius:6px}table{color:#000;font-size:13px}.tborder{background:#fff;width:100%;margin:auto;border:1px solid #ccc;padding:1px}.thead{background:#a1a2a2 url(thead.png) top left repeat-x;color:#fff;border-bottom:1px solid #8e8f8f;padding:8px}.tcat{background:#dcdbdc url(tcat.png) repeat-x;color:#fff;border-bottom:1px solid #bbb;padding:6px;font-size:12px}.trow1{background:#f5f5f5;border:1px solid;border-color:#fff #ddd #ddd #fff}.trow2{background:#efefef;border:1px solid;border-color:#fff #ddd #ddd #fff;padding:15px;box-sizing:border-box;-moz-box-sizing:border-box}.padtopp{padding-top:25px}table{color:#000;font-size:13px;text-align:left}.tborder{background:#fff;width:100%;margin:auto;border:1px solid #ccc;padding:1px}.thead{background:#a1a2a2 url(thead.png) top left repeat-x;color:#fff;border-bottom:1px solid #8e8f8f;padding:8px}.tcat{background:#dcdbdc url(tcat.png) repeat-x;color:#fff;border-bottom:1px solid #bbb;padding:6px;font-size:12px}.trow1{background:#f5f5f5;border:1px solid;border-color:#fff #ddd #ddd #fff}.trow2{background:#efefef;border:1px solid;border-color:#fff #ddd #ddd #fff}.smalltext{font-size:11px}textarea{background:#fff;color:#000;border:1px solid #ccc;padding:2px;line-height:1.4;font-family:Tahoma,Verdana,Arial,Sans-Serif;font-size:13px}select{background:#fff;padding:3px;border:1px solid #ccc;font-family:Tahoma,Verdana,Arial,Sans-Serif}.usercp_nav_item{display:block;padding:1px 0 1px 23px}.usercp_nav_pmfolder{background:url(pmfolder.gif) no-repeat left center}.usercp_nav_sub_pmfolder{padding-left:40px;background:url(sub_pmfolder.gif) no-repeat left center}.usercp_nav_home{background:url(home.gif) no-repeat left center}.pagehead{position:fixed;z-index:99999;top:0;left:0;width:100%}table{width:100%}table th{border-bottom:1px solid rgba(0,0,0,0.12);padding:5px;text-align:left}table tr:nth-child(odd){background-color:rgba(0,0,0,0.015)}p{margin:4px 0;padding:4px 3px}a{text-decoration:none;color:#000;-webkit-transition:color .1s linear;-moz-transition:color .1s linear;transition:color .1s linear}a:hover{color:#888}input[type="text"]{background:#fff;color:#000;border:1px solid #ccc;padding:2px;line-height:1.4;font-family:Tahoma,Verdana,Arial,Sans-Serif;font-size:13px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}input[type="text"]:hover{background-color:#E5E4E2}input[type="text"]:focus{background-color:#E5E4E2}hr{border:none;height:1px;background-color:rgba(0,0,0,0.12)}h4{padding-bottom:10px;margin-bottom:12px;border-bottom:1px solid rgba(0,0,0,0.12)}#ChatDiv{margin-bottom:10px}#ChatMessage{width:92%;margin-right:5px;box-sizing:border-box;-moz-box-sizing:border-box}input[type="submit"]{padding:3px;padding-left:5px;padding-right:5px;cursor:pointer;font-family:Tahoma,Verdana,Arial,Sans-Serif;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;background:#f5f5f5;border:1px solid #ccc}input[type="submit"]:hover{background-color:#E5E4E2}button:disabled,input:disabled{padding:3px;padding-left:5px;padding-right:5px;cursor:pointer;font-family:Tahoma,Verdana,Arial,Sans-Serif;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border:none!important;color:#fff!important;background-color:#ccc!important} -- cgit v1.2.3 From 7590d5facf5f7e8945bbfe555552b774f5e31857 Mon Sep 17 00:00:00 2001 From: Arian Date: Mon, 27 Oct 2014 19:31:25 +0100 Subject: Update login_template.html Added licence --- MCServer/webadmin/login_template.html | 1 + 1 file changed, 1 insertion(+) (limited to 'MCServer') diff --git a/MCServer/webadmin/login_template.html b/MCServer/webadmin/login_template.html index b305e030f..af80470e8 100644 --- a/MCServer/webadmin/login_template.html +++ b/MCServer/webadmin/login_template.html @@ -1,3 +1,4 @@ +/* Copyright Justin S and MCServer Team, licensed under CC-BY-SA 3.0 */ MCServer WebAdmin - Login -- cgit v1.2.3 From 738905c84d30072a8801ef6819f858926bab99e0 Mon Sep 17 00:00:00 2001 From: Arian Date: Mon, 27 Oct 2014 19:31:51 +0100 Subject: Update template.lua Added licence --- MCServer/webadmin/template.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'MCServer') diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua index d6ac2e94c..fc0d8837a 100644 --- a/MCServer/webadmin/template.lua +++ b/MCServer/webadmin/template.lua @@ -62,6 +62,7 @@ function ShowPage(WebAdmin, TemplateRequest) end Output([[ +/* Copyright Justin S and MCServer Team, licensed under CC-BY-SA 3.0 */ ]] .. Title .. [[ -- cgit v1.2.3 From 6d306b9c4e8778afdd2763f2b273509cedca62af Mon Sep 17 00:00:00 2001 From: Arian Date: Mon, 27 Oct 2014 23:46:46 +0100 Subject: Update style.css --- MCServer/webadmin/files/style.css | 433 +++++++++++++++++++++++++++++++++++++- 1 file changed, 432 insertions(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/style.css b/MCServer/webadmin/files/style.css index 4c38af695..c3f6849df 100644 --- a/MCServer/webadmin/files/style.css +++ b/MCServer/webadmin/files/style.css @@ -1,2 +1,433 @@ /* Copyright Justin S and MCServer Team, licensed under CC-BY-SA 3.0 */ -*{margin:0}body{font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;-webkit-font-smoothing:antialiased;background:#fff;width:100%;min-width:100%;overflow-y:scroll;overflow-x:hidden}a:link{color:#555;text-decoration:none}a:visited{color:#444;text-decoration:none}a:hover,a:active{color:#000;text-decoration:underline}img{border:none}h1{color:#069;text-shadow:2px 2px #000}.row1{border-bottom:1px #000 solid;height:100px;max-height:100px;background:#fff url(header.png) repeat-x top left}.row2{margin:0 auto;text-align:center;vertical-align:middle;margin-top:125px}.contention{color:#000;text-align:left;line-height:1.4;margin:0;font-family:Tahoma,Verdana,Arial,Sans-Serif;font-size:13px}.push10{padding-bottom:75px}#panel ul.menu{margin:0;padding:0;list-style:none}#panel ul.menu li{margin:0 5px;display:inline}#panel ul.menu li a{padding-left:20px;background-repeat:no-repeat;background-position:left center}#panel .upper ul.top_links{float:right;font-weight:700}#panel .upper{background:#dcdbdc url(tcat.png) repeat-x;border-top:1px solid #fff;border-bottom:1px solid #bbb;padding:7px}#footer{z-index:99999}#footer ul.menu{margin:0;padding:0;list-style:none}#footer ul.menu li{margin:0 5px;display:inline}#footer .upper{background:#dcdbdc url(tcat.png) repeat-x;border-top:1px solid #bbb;padding:6px;overflow:hidden;font-size:12px}#footer .upper ul.bottom_links{float:left;margin:3px 0 0 -5px}#footer .lower{background:#a1a2a2 url(thead.png) top left repeat-x;color:#fff;border-top:1px solid #ccc;border-bottom:1px solid #ddd;overflow:hidden;padding:8px;font-size:11px}#footer .lower a:link,#footer .lower a:visited{color:#fff;font-weight:700}#footer .lower a:hover,#footer .lower a:active{color:#fff;font-weight:700}#footer .lower #current_time{float:right;padding-right:6px}.wrapper{width:85%;min-width:970px;max-width:1500px;margin:auto}#footer{position:fixed;left:0;bottom:0;height:60px;width:100%;background:#999;border-top:1px #000 solid}* html #footer{position:absolute;top:expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px')}tr td.trow1:first-child,tr td.trow2:first-child{border-left:0}tr td.trow1:last-child,tr td.trow2:last-child{border-right:0}.tborder{-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px}.thead{-moz-border-radius-topleft:6px;-moz-border-radius-topright:6px;-webkit-border-top-left-radius:6px;-webkit-border-top-right-radius:6px;border-top-left-radius:6px;border-top-right-radius:6px}table{color:#000;font-size:13px}.tborder{background:#fff;width:100%;margin:auto;border:1px solid #ccc;padding:1px}.thead{background:#a1a2a2 url(thead.png) top left repeat-x;color:#fff;border-bottom:1px solid #8e8f8f;padding:8px}.tcat{background:#dcdbdc url(tcat.png) repeat-x;color:#fff;border-bottom:1px solid #bbb;padding:6px;font-size:12px}.trow1{background:#f5f5f5;border:1px solid;border-color:#fff #ddd #ddd #fff}.trow2{background:#efefef;border:1px solid;border-color:#fff #ddd #ddd #fff;padding:15px;box-sizing:border-box;-moz-box-sizing:border-box}.padtopp{padding-top:25px}table{color:#000;font-size:13px;text-align:left}.tborder{background:#fff;width:100%;margin:auto;border:1px solid #ccc;padding:1px}.thead{background:#a1a2a2 url(thead.png) top left repeat-x;color:#fff;border-bottom:1px solid #8e8f8f;padding:8px}.tcat{background:#dcdbdc url(tcat.png) repeat-x;color:#fff;border-bottom:1px solid #bbb;padding:6px;font-size:12px}.trow1{background:#f5f5f5;border:1px solid;border-color:#fff #ddd #ddd #fff}.trow2{background:#efefef;border:1px solid;border-color:#fff #ddd #ddd #fff}.smalltext{font-size:11px}textarea{background:#fff;color:#000;border:1px solid #ccc;padding:2px;line-height:1.4;font-family:Tahoma,Verdana,Arial,Sans-Serif;font-size:13px}select{background:#fff;padding:3px;border:1px solid #ccc;font-family:Tahoma,Verdana,Arial,Sans-Serif}.usercp_nav_item{display:block;padding:1px 0 1px 23px}.usercp_nav_pmfolder{background:url(pmfolder.gif) no-repeat left center}.usercp_nav_sub_pmfolder{padding-left:40px;background:url(sub_pmfolder.gif) no-repeat left center}.usercp_nav_home{background:url(home.gif) no-repeat left center}.pagehead{position:fixed;z-index:99999;top:0;left:0;width:100%}table{width:100%}table th{border-bottom:1px solid rgba(0,0,0,0.12);padding:5px;text-align:left}table tr:nth-child(odd){background-color:rgba(0,0,0,0.015)}p{margin:4px 0;padding:4px 3px}a{text-decoration:none;color:#000;-webkit-transition:color .1s linear;-moz-transition:color .1s linear;transition:color .1s linear}a:hover{color:#888}input[type="text"]{background:#fff;color:#000;border:1px solid #ccc;padding:2px;line-height:1.4;font-family:Tahoma,Verdana,Arial,Sans-Serif;font-size:13px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}input[type="text"]:hover{background-color:#E5E4E2}input[type="text"]:focus{background-color:#E5E4E2}hr{border:none;height:1px;background-color:rgba(0,0,0,0.12)}h4{padding-bottom:10px;margin-bottom:12px;border-bottom:1px solid rgba(0,0,0,0.12)}#ChatDiv{margin-bottom:10px}#ChatMessage{width:92%;margin-right:5px;box-sizing:border-box;-moz-box-sizing:border-box}input[type="submit"]{padding:3px;padding-left:5px;padding-right:5px;cursor:pointer;font-family:Tahoma,Verdana,Arial,Sans-Serif;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;background:#f5f5f5;border:1px solid #ccc}input[type="submit"]:hover{background-color:#E5E4E2}button:disabled,input:disabled{padding:3px;padding-left:5px;padding-right:5px;cursor:pointer;font-family:Tahoma,Verdana,Arial,Sans-Serif;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;border:none!important;color:#fff!important;background-color:#ccc!important} +* { + margin: 0; +} + +body { + font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif; + -webkit-font-smoothing: antialiased; + background: #fff; + width: 100%; + min-width: 100%; + overflow-y: scroll; + overflow-x: hidden; +} + +a:link { + color: #555; + text-decoration: none; +} + +a:visited { + color: #444; + text-decoration: none; +} + +a:hover,a:active { + color: #000; + text-decoration: underline; +} + +img { + border: none; +} + +h1 { + color: #069; + text-shadow: 2px 2px #000; +} + +.row1 { + border-bottom: 1px #000 solid; + height: 100px; + max-height: 100px; + background: #fff url(header.png) repeat-x top left; +} + +.row2 { + margin: 0 auto; + text-align: center; + vertical-align: middle; + margin-top: 125px; +} + +.contention { + color: #000; + text-align: left; + line-height: 1.4; + margin: 0; + font-family: Tahoma,Verdana,Arial,Sans-Serif; + font-size: 13px; +} + +.push10 { + padding-bottom: 75px; +} + +#panel ul.menu { + margin: 0; + padding: 0; + list-style: none; +} + +#panel ul.menu li { + margin: 0 5px; + display: inline; +} + +#panel ul.menu li a { + padding-left: 20px; + background-repeat: no-repeat; + background-position: left center; +} + +#panel .upper ul.top_links { + float: right; + font-weight: 700; +} + +#panel .upper { + background: #dcdbdc url(tcat.png) repeat-x; + border-top: 1px solid #fff; + border-bottom: 1px solid #bbb; + padding: 7px; +} + +#footer { + z-index: 99999; +} + +#footer ul.menu { + margin: 0; + padding: 0; + list-style: none; +} + +#footer ul.menu li { + margin: 0 5px; + display: inline; +} + +#footer .upper { + background: #dcdbdc url(tcat.png) repeat-x; + border-top: 1px solid #bbb; + padding: 6px; + overflow: hidden; + font-size: 12px; +} + +#footer .upper ul.bottom_links { + float: left; + margin: 3px 0 0 -5px; +} + +#footer .lower { + background: #a1a2a2 url(thead.png) top left repeat-x; + color: #fff; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ddd; + overflow: hidden; + padding: 8px; + font-size: 11px; +} + +#footer .lower a:link,#footer .lower a:visited { + color: #fff; + font-weight: 700; +} + +#footer .lower a:hover,#footer .lower a:active { + color: #fff; + font-weight: 700; +} + +#footer .lower #current_time { + float: right; + padding-right: 6px; +} + +.wrapper { + width: 85%; + min-width: 970px; + max-width: 1500px; + margin: auto; +} + +#footer { + position: fixed; + left: 0; + bottom: 0; + height: 60px; + width: 100%; + background: #999; + border-top: 1px #000 solid; +} + +* html #footer { + position: absolute; + top: expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px'); +} + +tr td.trow1:first-child,tr td.trow2:first-child { + border-left: 0; +} + +tr td.trow1:last-child,tr td.trow2:last-child { + border-right: 0; +} + +.tborder { + -moz-border-radius: 7px; + -webkit-border-radius: 7px; + border-radius: 7px; +} + +.thead { + -moz-border-radius-topleft: 6px; + -moz-border-radius-topright: 6px; + -webkit-border-top-left-radius: 6px; + -webkit-border-top-right-radius: 6px; + border-top-left-radius: 6px; + border-top-right-radius: 6px; +} + +table { + color: #000; + font-size: 13px; +} + +.tborder { + background: #fff; + width: 100%; + margin: auto; + border: 1px solid #ccc; + padding: 1px; +} + +.thead { + background: #a1a2a2 url(thead.png) top left repeat-x; + color: #fff; + border-bottom: 1px solid #8e8f8f; + padding: 8px; +} + +.tcat { + background: #dcdbdc url(tcat.png) repeat-x; + color: #fff; + border-bottom: 1px solid #bbb; + padding: 6px; + font-size: 12px; +} + +.trow1 { + background: #f5f5f5; + border: 1px solid; + border-color: #fff #ddd #ddd #fff; +} + +.trow2 { + background: #efefef; + border: 1px solid; + border-color: #fff #ddd #ddd #fff; + padding: 15px; + box-sizing: border-box; + -moz-box-sizing: border-box; +} + +.padtopp { + padding-top: 25px; +} + +table { + color: #000; + font-size: 13px; + text-align: left; +} + +.tborder { + background: #fff; + width: 100%; + margin: auto; + border: 1px solid #ccc; + padding: 1px; +} + +.thead { + background: #a1a2a2 url(thead.png) top left repeat-x; + color: #fff; + border-bottom: 1px solid #8e8f8f; + padding: 8px; +} + +.tcat { + background: #dcdbdc url(tcat.png) repeat-x; + color: #fff; + border-bottom: 1px solid #bbb; + padding: 6px; + font-size: 12px; +} + +.trow1 { + background: #f5f5f5; + border: 1px solid; + border-color: #fff #ddd #ddd #fff; +} + +.trow2 { + background: #efefef; + border: 1px solid; + border-color: #fff #ddd #ddd #fff; +} + +.smalltext { + font-size: 11px; +} + +textarea { + background: #fff; + color: #000; + border: 1px solid #ccc; + padding: 2px; + line-height: 1.4; + font-family: Tahoma,Verdana,Arial,Sans-Serif; + font-size: 13px; +} + +select { + background: #fff; + padding: 3px; + border: 1px solid #ccc; + font-family: Tahoma,Verdana,Arial,Sans-Serif; +} + +.usercp_nav_item { + display: block; + padding: 1px 0 1px 23px; +} + +.usercp_nav_pmfolder { + background: url(pmfolder.gif) no-repeat left center; +} + +.usercp_nav_sub_pmfolder { + padding-left: 40px; + background: url(sub_pmfolder.gif) no-repeat left center; +} + +.usercp_nav_home { + background: url(home.gif) no-repeat left center; +} + +.pagehead { + position: fixed; + z-index: 99999; + top: 0; + left: 0; + width: 100%; +} + +table { + width: 100%; +} + +table th { + border-bottom: 1px solid rgba(0,0,0,0.12); + padding: 5px; + text-align: left; +} + +table tr:nth-child(odd) { + background-color: rgba(0,0,0,0.015); +} + +p { + margin: 4px 0; + padding: 4px 3px; +} + +a { + text-decoration: none; + color: #000; + -webkit-transition: color .1s linear; + -moz-transition: color .1s linear; + transition: color .1s linear; +} + +a:hover { + color: #888; +} + +input[type="text"] { + background: #fff; + color: #000; + border: 1px solid #ccc; + padding: 2px; + line-height: 1.4; + font-family: Tahoma,Verdana,Arial,Sans-Serif; + font-size: 13px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; +} + +input[type="text"]:hover { + background-color: #E5E4E2; +} + +input[type="text"]:focus { + background-color: #E5E4E2; +} + +hr { + border: none; + height: 1px; + background-color: rgba(0,0,0,0.12); +} + +h4 { + padding-bottom: 10px; + margin-bottom: 12px; + border-bottom: 1px solid rgba(0,0,0,0.12); +} + +#ChatDiv { + margin-bottom: 10px; +} + +#ChatMessage { + width: 92%; + margin-right: 5px; + box-sizing: border-box; + -moz-box-sizing: border-box; +} + +input[type="submit"] { + padding: 3px; + padding-left: 5px; + padding-right: 5px; + cursor: pointer; + font-family: Tahoma,Verdana,Arial,Sans-Serif; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + background: #f5f5f5; + border: 1px solid #ccc; +} + +input[type="submit"]:hover { + background-color: #E5E4E2; +} + +button:disabled,input:disabled { + padding: 3px; + padding-left: 5px; + padding-right: 5px; + cursor: pointer; + font-family: Tahoma,Verdana,Arial,Sans-Serif; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + border: none!important; + color: #fff!important; + background-color: #ccc!important; +} -- cgit v1.2.3 From 22165559ea3797a3892d6910133af078ec55c8de Mon Sep 17 00:00:00 2001 From: Arian Date: Mon, 27 Oct 2014 23:48:02 +0100 Subject: Update login.css --- MCServer/webadmin/files/login.css | 219 +++++++++++++++++++++++++++++++++++++- 1 file changed, 218 insertions(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/login.css b/MCServer/webadmin/files/login.css index 3a766e1b6..659837598 100644 --- a/MCServer/webadmin/files/login.css +++ b/MCServer/webadmin/files/login.css @@ -1,2 +1,219 @@ /* Copyright Justin S and MCServer Team, licensed under CC-BY-SA 3.0 */ -*{margin:0}body{font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif;-webkit-font-smoothing:antialiased;background:#fff url(header.png) repeat-x top left;width:100%;min-width:100%;overflow:hidden}a:link{color:#555;text-decoration:none}a:visited{color:#444;text-decoration:none}a:hover,a:active{color:#000;text-decoration:underline}img{border:none}h1{color:#069}.row1{border-bottom:1px solid #000;height:100px;max-height:100px}.row2{margin:0 auto;text-align:center;vertical-align:middle}.contention{color:#000;text-align:left;line-height:1.4;margin:0;font-family:Tahoma,Verdana,Arial,Sans-Serif;font-size:13px}button{background:#fff;color:#000;border:1px solid #ccc;padding:3px;font-family:Tahoma,Verdana,Arial,Sans-Serif;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin:-3px 0}button:hover{border-top-color:#28597a;background:#28597a;color:#ccc}button:active{border-top-color:#1b435e;background:#1b435e}.push10{padding-bottom:75px}#panel .upper{background:#dcdbdc url(tcat.png) repeat-x;border-top:1px solid #fff;border-bottom:1px solid #bbb;padding:7px}#footer{z-index:99999}#footer ul.menu{margin:0;padding:0;list-style:none}#footer ul.menu li{margin:0 5px;display:inline}#footer .upper{background:#dcdbdc url(tcat.png) repeat-x;border-top:1px solid #bbb;padding:6px;overflow:hidden;font-size:12px}#footer .upper ul.bottom_links{float:left;margin:3px 0 0 -5px}#footer .lower{background:#a1a2a2 url(thead.png) top left repeat-x;color:#fff;border-top:1px solid #ccc;border-bottom:1px solid #ddd;overflow:hidden;padding:8px;font-size:11px}#footer .lower a:link,#footer .lower a:visited{color:#fff;font-weight:700}#footer .lower a:hover,#footer .lower a:active{color:#fff;font-weight:700}#footer .lower #current_time{float:right;padding-right:6px}.wrapper{width:85%;min-width:970px;max-width:1500px;margin:auto}#footer{position:fixed;left:0;bottom:0;height:60px;width:100%;background:#999;border-top:1px #000 solid}* html #footer{position:absolute;top:expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px')}tr td.trow2:first-child{border-left:0}tr td.trow2:last-child{border-right:0}.tborder{-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px}.thead,.rounded_top{-moz-border-radius-topleft:6px;-moz-border-radius-topright:6px;-webkit-border-top-left-radius:6px;-webkit-border-top-right-radius:6px;border-top-left-radius:6px;border-top-right-radius:6px}table{color:#000;font-size:13px}.tborder{background:#fff;width:100%;margin:auto;border:1px solid #ccc;padding:1px}.thead{background:#a1a2a2 url(thead.png) top left repeat-x;color:#fff;border-bottom:1px solid #8e8f8f;padding:8px}.trow2{background:#efefef;border:1px solid;border-color:#fff #ddd #ddd #fff}.padtopp{padding-top:25px} +* { + margin: 0; +} + +body { + font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif; + -webkit-font-smoothing: antialiased; + background: #fff url(header.png) repeat-x top left; + width: 100%; + min-width: 100%; + overflow: hidden; +} + +a:link { + color: #555; + text-decoration: none; +} + +a:visited { + color: #444; + text-decoration: none; +} + +a:hover,a:active { + color: #000; + text-decoration: underline; +} + +img { + border: none; +} + +h1 { + color: #069; +} + +.row1 { + border-bottom: 1px solid #000; + height: 100px; + max-height: 100px; +} + +.row2 { + margin: 0 auto; + text-align: center; + vertical-align: middle; +} + +.contention { + color: #000; + text-align: left; + line-height: 1.4; + margin: 0; + font-family: Tahoma,Verdana,Arial,Sans-Serif; + font-size: 13px; +} + +button { + background: #fff; + color: #000; + border: 1px solid #ccc; + padding: 3px; + font-family: Tahoma,Verdana,Arial,Sans-Serif; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + margin: -3px 0; +} + +button:hover { + border-top-color: #28597a; + background: #28597a; + color: #ccc; +} + +button:active { + border-top-color: #1b435e; + background: #1b435e; +} + +.push10 { + padding-bottom: 75px; +} + +#panel .upper { + background: #dcdbdc url(tcat.png) repeat-x; + border-top: 1px solid #fff; + border-bottom: 1px solid #bbb; + padding: 7px; +} + +#footer { + z-index: 99999; +} + +#footer ul.menu { + margin: 0; + padding: 0; + list-style: none; +} + +#footer ul.menu li { + margin: 0 5px; + display: inline; +} + +#footer .upper { + background: #dcdbdc url(tcat.png) repeat-x; + border-top: 1px solid #bbb; + padding: 6px; + overflow: hidden; + font-size: 12px; +} + +#footer .upper ul.bottom_links { + float: left; + margin: 3px 0 0 -5px; +} + +#footer .lower { + background: #a1a2a2 url(thead.png) top left repeat-x; + color: #fff; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ddd; + overflow: hidden; + padding: 8px; + font-size: 11px; +} + +#footer .lower a:link,#footer .lower a:visited { + color: #fff; + font-weight: 700; +} + +#footer .lower a:hover,#footer .lower a:active { + color: #fff; + font-weight: 700; +} + +#footer .lower #current_time { + float: right; + padding-right: 6px; +} + +.wrapper { + width: 85%; + min-width: 970px; + max-width: 1500px; + margin: auto; +} + +#footer { + position: fixed; + left: 0; + bottom: 0; + height: 60px; + width: 100%; + background: #999; + border-top: 1px #000 solid; +} + +* html #footer { + position: absolute; + top: expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px'); +} + +tr td.trow2:first-child { + border-left: 0; +} + +tr td.trow2:last-child { + border-right: 0; +} + +.tborder { + -moz-border-radius: 7px; + -webkit-border-radius: 7px; + border-radius: 7px; +} + +.thead,.rounded_top { + -moz-border-radius-topleft: 6px; + -moz-border-radius-topright: 6px; + -webkit-border-top-left-radius: 6px; + -webkit-border-top-right-radius: 6px; + border-top-left-radius: 6px; + border-top-right-radius: 6px; +} + +table { + color: #000; + font-size: 13px; +} + +.tborder { + background: #fff; + width: 100%; + margin: auto; + border: 1px solid #ccc; + padding: 1px; +} + +.thead { + background: #a1a2a2 url(thead.png) top left repeat-x; + color: #fff; + border-bottom: 1px solid #8e8f8f; + padding: 8px; +} + +.trow2 { + background: #efefef; + border: 1px solid; + border-color: #fff #ddd #ddd #fff; +} + +.padtopp { + padding-top: 25px; +} -- cgit v1.2.3 From 292d13ad9a42342dc79d3f1ea794f8877264e931 Mon Sep 17 00:00:00 2001 From: Arian Date: Mon, 27 Oct 2014 23:49:26 +0100 Subject: Update login_template.html --- MCServer/webadmin/login_template.html | 166 ++++++++++++++++++++++------------ 1 file changed, 108 insertions(+), 58 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/login_template.html b/MCServer/webadmin/login_template.html index af80470e8..4ab76b36b 100644 --- a/MCServer/webadmin/login_template.html +++ b/MCServer/webadmin/login_template.html @@ -1,68 +1,118 @@ /* Copyright Justin S and MCServer Team, licensed under CC-BY-SA 3.0 */ -MCServer WebAdmin - Login - - - + + MCServer WebAdmin - Login + + + + -
-
-
- -
-
-
-
-
-
-
-
-
-
-
- - - - - - - - - -
-
-MCServer WebAdmin -
-
-
- -
-
-
-
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + + + + + + + + +
+
+ + MCServer WebAdmin + +
+
+
+ +
+
+
+
-- cgit v1.2.3 From c0c1a9ceea0a2231f7365c47cda933dcc18a44ed Mon Sep 17 00:00:00 2001 From: Arian Date: Tue, 28 Oct 2014 00:08:29 +0100 Subject: Update template.lua --- MCServer/webadmin/template.lua | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/template.lua b/MCServer/webadmin/template.lua index fc0d8837a..b3c84dee2 100644 --- a/MCServer/webadmin/template.lua +++ b/MCServer/webadmin/template.lua @@ -23,11 +23,30 @@ end function GetDefaultPage() local PM = cRoot:Get():GetPluginManager() - local SubTitle = "Home" + local SubTitle = "Current Game" local Content = "" - Content = Content .. "

Home Home Home

    I have no idea what this content should do.
" + Content = Content .. "

Server Name:

" + Content = Content .. "

" .. cRoot:Get():GetServer():GetServerID() .. "

" + Content = Content .. "

Plugins:

    " + local AllPlugins = PM:GetAllPlugins() + for key,value in pairs(AllPlugins) do + if( value ~= nil and value ~= false ) then + Content = Content .. "
  • " .. key .. " (version " .. value:GetVersion() .. ")
  • " + end + end + + Content = Content .. "
" + Content = Content .. "

Players:

    " + + local AddPlayerToTable = function( Player ) + Content = Content .. "
  • " .. Player:GetName() .. "
  • " + end + cRoot:Get():ForEachPlayer( AddPlayerToTable ) + + Content = Content .. "

"; + return Content, SubTitle end -- cgit v1.2.3 From 9b93cb647d763eaf76c679ba0c5061210c7b1c4d Mon Sep 17 00:00:00 2001 From: Arian Date: Tue, 28 Oct 2014 21:40:50 +0100 Subject: Update guest.html --- MCServer/webadmin/files/guest.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/guest.html b/MCServer/webadmin/files/guest.html index 9a9fabfcb..7ae78a3f0 100644 --- a/MCServer/webadmin/files/guest.html +++ b/MCServer/webadmin/files/guest.html @@ -1,3 +1,2 @@ -Hello Admin, this is a welcome message.
-You will see this because you didn't change the guest welcome message.
-To change the welcome message go to file: files/guest.html and change it!. +Hello! Welcome to the MCServer WebAdmin.
+This is a default message, edit files/guest.html to add your own custom message. -- cgit v1.2.3 From 3f21c8bb24d106fa157ddc7af721b854e962d5f2 Mon Sep 17 00:00:00 2001 From: Arian Date: Tue, 28 Oct 2014 21:41:16 +0100 Subject: Update login.css --- MCServer/webadmin/files/login.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/login.css b/MCServer/webadmin/files/login.css index 659837598..2d2a8e9e9 100644 --- a/MCServer/webadmin/files/login.css +++ b/MCServer/webadmin/files/login.css @@ -4,7 +4,7 @@ } body { - font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif; + font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; -webkit-font-smoothing: antialiased; background: #fff url(header.png) repeat-x top left; width: 100%; -- cgit v1.2.3 From a9f2f2e6344c71b13a7292b9c9303b635fc2b848 Mon Sep 17 00:00:00 2001 From: Arian Date: Tue, 28 Oct 2014 21:41:56 +0100 Subject: Update login.css --- MCServer/webadmin/files/login.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/login.css b/MCServer/webadmin/files/login.css index 2d2a8e9e9..5d87da4c5 100644 --- a/MCServer/webadmin/files/login.css +++ b/MCServer/webadmin/files/login.css @@ -22,7 +22,7 @@ a:visited { text-decoration: none; } -a:hover,a:active { +a:hover, a:active { color: #000; text-decoration: underline; } @@ -128,12 +128,12 @@ button:active { font-size: 11px; } -#footer .lower a:link,#footer .lower a:visited { +#footer .lower a:link, #footer .lower a:visited { color: #fff; font-weight: 700; } -#footer .lower a:hover,#footer .lower a:active { +#footer .lower a:hover, #footer .lower a:active { color: #fff; font-weight: 700; } @@ -179,7 +179,7 @@ tr td.trow2:last-child { border-radius: 7px; } -.thead,.rounded_top { +.thead, .rounded_top { -moz-border-radius-topleft: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-left-radius: 6px; -- cgit v1.2.3 From a9b152956e9435889a6d9251c89f06274f9389a0 Mon Sep 17 00:00:00 2001 From: Arian Date: Tue, 28 Oct 2014 21:51:42 +0100 Subject: Update style.css --- MCServer/webadmin/files/style.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/files/style.css b/MCServer/webadmin/files/style.css index c3f6849df..541cd389a 100644 --- a/MCServer/webadmin/files/style.css +++ b/MCServer/webadmin/files/style.css @@ -4,7 +4,7 @@ } body { - font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,"Lucida Grande",sans-serif; + font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; -webkit-font-smoothing: antialiased; background: #fff; width: 100%; @@ -23,7 +23,7 @@ a:visited { text-decoration: none; } -a:hover,a:active { +a:hover, a:active { color: #000; text-decoration: underline; } @@ -168,11 +168,11 @@ h1 { top: expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px'); } -tr td.trow1:first-child,tr td.trow2:first-child { +tr td.trow1:first-child, tr td.trow2:first-child { border-left: 0; } -tr td.trow1:last-child,tr td.trow2:last-child { +tr td.trow1:last-child, tr td.trow2:last-child { border-right: 0; } -- cgit v1.2.3 From c105e6fa03e73d5f6684b6f5659f611c46278bac Mon Sep 17 00:00:00 2001 From: Arian Date: Tue, 28 Oct 2014 22:09:11 +0100 Subject: Update login_template.html --- MCServer/webadmin/login_template.html | 172 ++++++++++++---------------------- 1 file changed, 62 insertions(+), 110 deletions(-) (limited to 'MCServer') diff --git a/MCServer/webadmin/login_template.html b/MCServer/webadmin/login_template.html index 4ab76b36b..a6a8dea44 100644 --- a/MCServer/webadmin/login_template.html +++ b/MCServer/webadmin/login_template.html @@ -1,118 +1,70 @@ /* Copyright Justin S and MCServer Team, licensed under CC-BY-SA 3.0 */ - + - - MCServer WebAdmin - Login - - - - + MCServer WebAdmin - Login + + + -
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
-
- - - - - - - - - -
-
- - MCServer WebAdmin - -
-
-
- -
-
-
-
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ + + + + + + + + +
+
MCServer WebAdmin
+
+
+ +
+
+
+
-