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.65 1997/08/13 21:37:32 per Exp $"; + string cvs_version = "$Id: mainconfig.pike,v 1.66 1997/08/13 22:06:05 grubba Exp $";   inherit "roxenlib";   inherit "config/draw_things";      import Array;   import Stdio;   string status_row(object node);   string display_tabular_header(object node);   object get_template(string t);    - /* Work-around for Simulate.perror */ + /* Work-around for Simulate.perror */#   #define perror roxen_perror      #include <confignode.h>   #include <module.h>      #define dR "ff"   #define dG "ff"   #define dB "ff"      #define bdR "00"
Roxen.git/server/base_server/mainconfig.pike:524:    foreach(roxen->configurations, o)    res += "<option>Copy of '"+o->name+"'";    return res;   }      string configuration_types()   {    string res="";    foreach(get_dir("server_templates"), string c)    { -  catch { -  if(c[-1]=='e' || c[0]!='#') -  res += "<option value=\""+c+"\">"+get_template(c)->name; -  }; +  array err; +  if (err = catch { +  if(c[-1]=='e' || c[0]!='#') { +  object o = get_template(c); +  res += sprintf("<option value=\"%s\"%s>%s\n", +  c, +  (o->selected?" selected":""), +  o->name);    } -  +  }) { +  report_error(sprintf("Error initializing server template \"%s\"\n" +  "%s\n", c, describe_backtrace(err))); +  } +  }    return res;   }      string describe_config_modules(array mods)   {    string res = "This configuration template adds the following modules:<p><ul>";    if(!mods||!sizeof(mods)) return "This configuration template adds no modules";       foreach(mods, string mod)    {