Roxen.git / server / base_server / mainconfig.pike

version» Context lines:

Roxen.git/server/base_server/mainconfig.pike:1:   inherit "config/builders"; - string cvs_version = "$Id: mainconfig.pike,v 1.34 1997/02/22 22:28:57 per Exp $"; + string cvs_version = "$Id: mainconfig.pike,v 1.35 1997/03/11 01:19:22 per Exp $";   inherit "roxenlib";   inherit "config/draw_things";      import Stdio;   import Array;      #include <confignode.h>   #include <module.h>      #define dR "00"
Roxen.git/server/base_server/mainconfig.pike:285:    op[i][1] = allvars["protocol_"+i]||op[i][1];    op[i][2] = allvars["ip_number_"+i]||op[i][2];    op[i][3] = allvars["arguments_"+i]||op[i][3];    } else // Delete this port.    op[i]=0;    }    return op - ({ 0 });       case TYPE_DIR_LIST:    array foo; +  array st;    foo=map((var-" ")/",", lambda(string var, object node) { -  if (!strlen( var ) || file_stat( var )[1] != -2) +  array st; +  if (!strlen( var ) || !(st = file_stat( var )) || (st[1] != -2))    {    if(node->error)    node->error += ", " +var + " is not a directory";    else    node->error = var + " is not a directory";    return 0;    }    if(var[-1] != '/')    return var + "/";    return var;    }, node);       if(sizeof(foo-({0})) != sizeof(foo))    return 0;    return foo;       case TYPE_DIR: -  if (!strlen( var ) || file_stat( var )[1] != -2) +  if (!strlen( var ) || !(st = file_stat( var )) || (st[1] != -2))    {    node->error = var + " is not a directory";    return 0;    }    if(var[-1] != '/')    return var + "/";    return var;       case TYPE_TEXT_FIELD:    var -= "\r"; -  +  case TYPE_FONT:    case TYPE_STRING:    case TYPE_FILE:    case TYPE_LOCATION:    return var;       case TYPE_PASSWORD:    return crypt(var);       case TYPE_FLAG:    return lower_case(var) == "yes";
Roxen.git/server/base_server/mainconfig.pike:497:   string new_module_form(object id, object node)   {    int i;    mixed a,b;    string q;    array mods;    array (string) res;       if(!roxen->allmodules || sizeof(id->pragma))    { -  perror("CONFIG: Rescanning modules.\n"); +  werror("CONFIG: Rescanning modules.\n");    roxen->current_configuration = node->config();    roxen->rescan_modules();    roxen->current_configuration = 0; -  perror("CONFIG: Done.\n"); +  werror("CONFIG: Done.\n");    }       a=roxen->allmodules;    mods=sort_array(indices(a), lambda(string a, string b, mapping m) {    return m[a][0] > m[b][0];    }, a);       res = ({default_head("Add a module")+"\n\n"+    "<h2>Select a module to add from the list below</h2>" });