Guest User

Untitled

a guest
Aug 7th, 2012
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. function addCommand(k, fn, case)
  2.     Commands[k] = Commands[k] or {}
  3.     Commands[k][fn] = (case and true or false)
  4. end
  5.  
  6. function removeCommands()
  7.     for name,functions in pairs(Commands) do
  8.         for fn in pairs(functions) do
  9.             if fn then
  10.                 removeCommandHandler(name, fn)
  11.             end
  12.         end
  13.     end
  14. end
  15.  
  16. function installCommands()
  17.     for name,functions in pairs(Commands) do
  18.         for fn, case in pairs(functions) do
  19.             if fn then
  20.                 addCommandHandler(name, fn, false, case)
  21.             end
  22.         end
  23.     end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment