-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
etc_alias.lua - create command alias #45
Comments
will think about this |
Perhaps not the most elegant, but I solved it by changing the scripts to add an alternate commands: like in case of useruptime for example, added cmd1. But of course this makes life more difficult when you want to upgrade to newer version. local cmd = "useruptime" ...
...
|
Your approach is correct. Note, that if you use luadch/scripts/etc_hubcommands.lua Line 49 in 5c773e5
So, to add aliases, basically do: -- define commands and its aliases
local cmd = { "useruptime", "uu", "ut" }
-- add some menu entry for the first command
ucmd.add( ucmd_menu_ct1_2, cmd[1], { }, { "CT1" }, minlevel )
-- register commands
assert( hubcmd.add( cmd, onbmsg ) ) I added this for |
I don't get it? Alias for one command and it is way to complex for us regular guys that don't code ☹ My suggestion was to create an alias script that was easy to edit and add and change alias for most of the commands you use in Luadch. And when you update Luadch you have to edit every single script that you have added an alias to. Not very practical. For this to work it must be very easy to add an alias. You simple write To remove an alias you write |
Give me a complete list of aliases you think to be useful, and I'll officially add it. But there are more important things to do then to write such a script. |
I asked for this for almost 5 years ago. No hurry, It can wait another 5 years. There is no need to do it half way. Do it right or not at all. |
A script that makes it possible to add command alias. So instead of writing
+usersearch
i only write+us
. Or if you are an OP that have recently moved from ADCH++ to Luadch and you have learn to use+listreg
it would be easy to add that as an alias to+usersearch
and all the OP's will be happy :)The text was updated successfully, but these errors were encountered: