Roxen.git / server / protocols / prot_hilfe.pike

version» Context lines:

Roxen.git/server/protocols/prot_hilfe.pike:186:    {    mixed q = roxen->urls[u];    if( (c = q->port->find_configuration_for_url( url,this_object(), 1 )) )    {    conf = c;    break;    }    }    }    +  if (!c->inited) { +  // FIXME: We can be called from the backend thread, so this +  // should be queued for a handler thread. +  c->enable_all_modules(); +  } +     string host;    sscanf( url, "%s://%s/%s", prot, host, url );    misc->host = host;    return set_path( "/"+url );    }    }    -  class InsinuateFirst -  { -  mixed query( string what ) { return 0; } -  void first_try( RequestID id ) -  { -  if(catch -  { -  rl->readline->write( sprintf("Request for %s in %O from %s\n", -  id->not_query, id->conf, id->remoteaddr),1); -  }) -  { -  id->conf->pri[4]->first_modules -= ({ this_object() }); -  id->conf->invalidate_cache(); -  } -  } -  } -  +     mixed hilfe_debug( string what )    {    if( !stringp( what ) )    error("Syntex: debug(\"what\");");    switch( what )    {    case "accesses": -  foreach( roxen->configurations, Configuration c ) -  if( c->inited ) -  { -  c->pri[4]->first_modules += ({ InsinuateFirst() }); -  c->invalidate_cache(); -  } -  break; +  error("Not supported anymore.\n");       default:    error("Don't know how to debug "+what+"\n");    }    }         #if __VERSION__ > 7.2    class Handler {    inherit Tools.Hilfe.Evaluator;
Roxen.git/server/protocols/prot_hilfe.pike:395:    if(!(user = roxen.find_admin_user( line-"\n" ) ) )    {    rl->readline->write("No such user: '"+(line-"\n")+"'\n");    }    else    {    state++;    }    break;    case PASSWORD: -  if( !crypt(line-"\n", user->password) ) +  if( !verify_password(line-"\n", user->password) )    {    rl->readline->write("Wrong password\n");    state=USER;    }    else    {    if( !my_port_obj->query( "require_auth" ) || user->auth( "Hilfe" ) )    state++;    else    {