Support callback function for objects.

This commit is contained in:
walterhiggins 2014-06-14 15:39:47 +01:00
parent 4df746a2d8
commit c9257b3038

View file

@ -11,7 +11,11 @@ var __onTabCompleteJSP = function( result, cmdSender, pluginCmd, cmdAlias, cmdAr
i; i;
cmd = _commands[cmdInput]; cmd = _commands[cmdInput];
if ( cmd ) { if ( cmd ) {
opts = cmd.options; if (typeof cmd.options === 'function'){
opts = cmd.options();
} else {
opts = cmd.options;
}
len = opts.length; len = opts.length;
if ( cmdArgs.length > 1 ) { if ( cmdArgs.length > 1 ) {
// partial e.g. /jsp chat_color dar // partial e.g. /jsp chat_color dar