fml 8 tutorial ( under being translated ... ) | ||
---|---|---|
Prev | Chapter 24. Command (command mail, CUI and GUI) | Next |
Warning |
To make a new command usable for all ML's on this host, you need to put the module you wrote at /usr/local/lib/fml/site_local/. If you permit the command is used only for the specifiec ML (e.g. elena ML), put it at the ML local library path /var/spool/ml/elena/local/lib/where $ml_home_dir = /var/spool/ml/elena. In this section, we consider the former case. In both cases, the way of writing the module codes are same. Only path differs. |
Consider to make a new user command "uja". Pick up a command at FML::Command, cut and paste it. Please put it at
/usr/local/lib/fml/site_local/FML/Command/User/uja.pmEdit site_default_config.cf to add it into $commands_for_user to permit the user of "uja" command.
commands_for_user += ujaIt you allow the command only for the specific elena ML, edit /var/spool/ml/elena/config.cf in the same way.
In the same way described above, hack the module!:) but the module path differs. Put it at the FML::Command::Admin:: class. For example
/usr/local/lib/fml/site_local/FML/Command/Admin/uja.pmEdit site_default_config.cf to add it into $commands_for_privileged_user to permit the use of "admin uja" command.
commands_for_privileged_user += uja
author's homepage is www.fml.org/home/fukachan/.
Also, visit nuinui's world :) at www.nuinui.net.
For questions about FML, e-mail <fml-bugs@fml.org>.