Sign in to follow this  
robhol

Listing commands

Recommended Posts

I think it could be useful having a tool that lists commands for you - something like

table getCommandHandlers( [ string/resource res ] )

(res is the resource from which the command handler was registered)

Since I'm fairly sure those are already collected at one place, this looks like another 5-min implementation, and it'd help for ACL masking, documentation and help files, etc. since overlooking one command in a large resource is easy and, especially in the case of ACL coverage, the results may be unpleasant..

Share this post


Link to post

I think this would be a good idea also a new event onPlayerCommand Which should be called every time a player does a command

EG

addEventHandler("onPlayerCommand",getRootElement(),
function (Command)
local Players = getElementsByType("player")
for k,p in ipairs(Players) do
if isObjectInACLGroup ( "user." .. getPlayerName(p), aclGetGroup ( "Admin" ) ) then
outputChatBox(getPlayerName(source).." typed: ".. Command,p)
end
end
end
)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.