Roxen.git / server / base_server / module.pike

version» Context lines:

Roxen.git/server/base_server/module.pike:1: - /* $Id: module.pike,v 1.26 1997/10/22 19:47:40 grubba Exp $ */ + /* $Id: module.pike,v 1.27 1998/01/21 21:34:21 grubba Exp $ */      #include <module.h>      mapping (string:mixed *) variables=([]);      object this = this_object();   int module_type;   string fix_cvs(string from)   {    from = replace(from, ({ "$", "Id: "," Exp $" }), ({"","",""}));
Roxen.git/server/base_server/module.pike:70:      void start(void|int num, void|object conf) {}   string status() {}      string info(object conf)   {    return (this->register_module(conf)[2]);   }      // Define a variable, with more than a little error checking... - varargs void defvar(string var, mixed value, string name, int type, -  string doc_str, mixed misc, int|function not_in_config) + void defvar(string|void var, mixed|void value, string|void name, +  int|void type, string|void doc_str, mixed|void misc, +  int|function|void not_in_config)   {    if(!strlen(var))    error("No name for variable!\n");      // if(var[0]=='_' && previous_object() != roxen)   // error("Variable names beginning with '_' are reserved for"   // " internal usage.\n");       if (!stringp(name))    name = var;
Roxen.git/server/base_server/module.pike:254:   }      string check_variable( string s, mixed value )   {    // Check if `value' is O.K. to store in the variable `s'. If so,    // return 0, otherwise return a string, describing the error.       return 0;   }    - varargs mixed query(string var, int ok) + mixed query(string|void var, int|void ok)   { -  if(var) +  if(var) {    if(variables[var])    return variables[var][VAR_VALUE];    else if(!ok)    error("Querying undefined variable.\n"); -  +  }       return variables;   }      void set_module_list(string var, string what, object to)   {    int p;    p = search(variables[var][VAR_VALUE], what);    if(p == -1)    {