Exemple #1
0
    virtual void Get(Session& ses, const string& elid) const
    {
		ServerInstanceInfo srv(ses);
		string passwd = srv.GetParam("ftppasswd");
		if (!passwd.empty()) {
			ses.NewNode("turn_on_ftp","on");
			ses.NewNode("agree","on");
		}
		ses.NewNode("user", srv.UserName);
		ses.NewNode("address","ftp://"+srv.GetIp()+"/");
		ses.NewNode("passwd",passwd);
	}
	virtual void GetParams(Session& ses, const string & id) {
		ServerInstanceInfo inst(Name, id);
		TeamFortress2Config conf(inst);
		
		StringVector maps;
		GetMaps( inst, maps );
		ses.BuildSelect( maps.begin(), maps.end(), "map" );
		ses.NewNode( "map", inst.GetParam( "map" ) );
		BuildRegionsSelect( ses );

		conf.ConfToSes(ses);
	}