ADVANCED DOCUMENTATION netbots.tcl v4.10
Using nb_ctrlbots Advanced Mode The standard usage of nb_ctrlbots lets you specify a list of bots that netbot commands will be accepted from. But nb_ctrlbots also has a special advanced mode of operation that allows you to specify a list of netbot commands each control bot has permission to trigger. To enable nb_ctrlbots advanced mode, you simply change the way nb_ctrlbots is set. The setting becomes an array variable, and the syntax is as follows: set nb_ctrlbots(bot1,bot2,botN) "*" The syntax above shows that there are three different ways you can specify the commands which will be accepted from each control bot. In the first case, any netbot command will be accepted from the specified bots. In the second case, only those commands listed will be accepted from the specified bots. Note that bot1,bot2,botN can be separated by spaces if required (e.g. if you want to use nb_group and your nb_group bots are separated by spaces). The third case is a list of commands that will be accepted from any valid netbot. In the following examples, you can see how nb_ctrlbots advanced mode could be applied in practice: set nb_ctrlbots(coolhub,FAThub) "*" In the above example, the bot will accept any netbot command from coolhub and FAThub, and will accept the 'netupdate' command from CuteBot. Commands from other netbots are rejected. set nb_ctrlbots(coolhub,FAThub) "*" In the above example, the bot will accept any netbot command from coolhub and FAThub, and will accept the 'netupdate' command from CuteBot. The bot will accept the 'netinfo' and 'netsay' commands from any netbot. set nb_ctrlbots($nb_group(hubbies))
"*" In the above example, the bot will accept any netbot command from bots listed in the 'hubbies' nb_group, and will accept the netinfo, netsay, and netshell commands from bots listed in the 'leafers' nb_group. Commands from other netbots are rejected. It is important to remember that the command names you specify correspond with internal netbot commands, which may not always match the DCC command (if any). While most netbot commands are given the same name as the DCC command (e.g. the internal netbot command for .netinfo is "netinfo"), this may not always be the case.
|
© 1999-2012 by egghelp.org. The text on this page is licensed under a Creative Commons Licence.