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:   inherit "config/builders"; - string cvs_version = "$Id: mainconfig.pike,v 1.98 1998/03/08 12:31:56 grubba Exp $"; + string cvs_version = "$Id: mainconfig.pike,v 1.99 1998/03/23 08:20:55 neotron Exp $";   //inherit "roxenlib";      inherit "config/draw_things";
409:    op[i][0] = (int)allvars["port_"+i]||op[i][0];    op[i][1] = allvars["protocol_"+i]||op[i][1];    op[i][2] = allvars["ip_number_"+i]||op[i][2]; +  string args = "";    -  if(allvars["key_"+i] || allvars["cert_"+i]) -  op[i][3] = -  (allvars["key_"+i]&&strlen(allvars["key_"+i])? -  "key-file "+allvars["key_"+i]+"\n":"")+ -  (allvars["cert_"+i]&&strlen(allvars["cert_"+i])? -  "cert-file "+allvars["cert_"+i]+"\n":""); +  if(allvars["key_"+i] && strlen(allvars["key_"+i])) +  args += "key-file "+allvars["key_"+i]+"\n"; +  if(allvars["cert_"+i] && strlen(allvars["cert_"+i])) +  args += "cert-file "+allvars["cert_"+i]+"\n"; +  +  if(strlen(args)) +  op[i][3] = args; +     } else // Delete this port.    op[i]=0;    }