From 98d574f05ea46763fc9e762b0719ab3ef2271230 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 16 Aug 2013 09:20:05 +0200 Subject: No more Core in the MCServer repo --- MCServer/Plugins/Core/help.lua | 43 ------------------------------------------ 1 file changed, 43 deletions(-) delete mode 100644 MCServer/Plugins/Core/help.lua (limited to 'MCServer/Plugins/Core/help.lua') diff --git a/MCServer/Plugins/Core/help.lua b/MCServer/Plugins/Core/help.lua deleted file mode 100644 index fe8c50492..000000000 --- a/MCServer/Plugins/Core/help.lua +++ /dev/null @@ -1,43 +0,0 @@ -function HandleHelpCommand( Split, Player ) - - local PluginManager = cRoot:Get():GetPluginManager() - - local LinesPerPage = 8 - local CurrentPage = 1 - local CurrentLine = 0 - local PageRequested = 1 - local Output = {} - - if (#Split == 2) then - PageRequested = tonumber( Split[2] ) - end - - local Process = function( Command, Permission, HelpString ) - if not (Player:HasPermission(Permission)) then - return false - end - if (HelpString == "") then - return false - end - - CurrentLine = CurrentLine + 1 - CurrentPage = math.floor( CurrentLine / LinesPerPage ) + 1 - if (CurrentPage ~= PageRequested) then - return false - end - table.insert( Output, Command .. HelpString ) - end - - PluginManager:ForEachCommand( Process ) - - -- CurrentPage now contains the total number of pages, and Output has the individual help lines to be sent - - SendMessage( Player, "Page " .. PageRequested .. " out of " .. CurrentPage .. "." ) - SendMessage( Player, "'-' means no prefix, '~' means a value is required." ) - for idx, msg in ipairs( Output ) do - SendMessage( Player, msg ) - end - - return true - -end -- cgit v1.2.3