~jadedctrl/gem-xwx-moe

~jadedctrl/gem-xwx-moe/gemujo_ludo/mods.niaj/fasado/ordono_tradukoj/cmd_alias/init.lua
 ..
0 cmd_alias = {}
1
2 function cmd_alias.register_chatcommand_alias(command, alias)
3 local cmd = minetest.registered_chatcommands[command]
4 if not cmd then
5 return
6 end
7
8 local alias_name = alias.cmd or alias
9 local params = alias.params or cmd.params
10 local desc = alias.description or cmd.description
11 minetest.register_chatcommand(alias_name, { params = params, description = desc, privs = cmd.privs, func = cmd.func })
12
13 if alias.replace then
14 minetest.unregister_chatcommand(command)
15 end
16 end