Branch: Tag:

1998-03-23

1998-03-23 08:20:58 by David Hedbor <david@hedbor.org>

o Added new module type, MODULE_PROVIDER. This is a module type which
enables other modules, scripts or protocols to call it very
simply. Function needed in the module:
"string|array|multiset query_provides()" - Return the name of the
data this module provides. One existing example is "counter"
(which is the graphical counter module).

Functions available to other modules:
object conf->get_provider(string for);
Get the first (highest priority) provider for "for".
array (object) conf->get_providers(string for);
Dito, but return all matching modules.
void map_providers(string for, string fun, mixed ... args);
Run the function "fun" in all modules providing "for", with the
optional arguments "args".
mixed call_provider(string for, string fun, mixed ... args);
Run the function "fun" in all modules providing "for", with the
optional arguments "args" until a positive response
(!zero). Return the result. This is the main way of calling
functions in provider modules from other places.

o Added new tag - echo. It's usable with one of the following syntaxes:
<echo var='Remote Host'> <echo remote_host> <insert remote_host>
Case doesn't matter and in the first syntax, ' ' and '_' are
interchangable. The available variables are identical to the SSI
<!--#echo var="..." -->

Rev: CHANGES:1.107
Rev: server/base_server/config/low_describers.pike:1.24
Rev: server/base_server/configuration.pike:1.112
Rev: server/base_server/mainconfig.pike:1.99
Rev: server/base_server/module.pike:1.30
Rev: server/etc/include/module.h:1.14
Rev: server/modules/graphics/counter.pike:1.17
Rev: server/modules/scripting/cgi.pike:1.78
Rev: server/modules/tags/htmlparse.pike:1.90

1: - /* $Id: module.pike,v 1.29 1998/02/06 18:31:56 grubba Exp $ */ + /* $Id: module.pike,v 1.30 1998/03/23 08:20:55 neotron Exp $ */      #include <module.h>   
332:    return s;   }    + /* By default, provide nothing. */ + string query_provides() { return 0; }      /*    * Parse and return a parsed version of the security levels for this module