Branch: Tag:


1998-03-23 08:20:58 by David Hedbor <>

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.h,v 1.13 1998/03/02 18:28:49 grubba Exp $ + // $Id: module.h,v 1.14 1998/03/23 08:20:56 neotron Exp $   #ifndef ROXEN_MODULE_H   #define ROXEN_MODULE_H   
15:   #define TYPE_MULTIPLE_INT 6      #define TYPE_FLAG 7 + #define TYPE_TOGGLE 7 +    #define TYPE_ERROR 8   #define TYPE_DIR_LIST 9   #define TYPE_FILE_LIST 10
83:      #define MODULE_SECURITY (2<<14)    + // A module which can be called from other modules, protocols, scripts etc.   #define MODULE_PROVIDER (2<<15)    -  +    #define MOD_ALLOW 1   #define MOD_USER 2   #define MOD_DENY 3