Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/tmp_r) is not within the allowed path(s): (/membri:/membri2) in /membri/x2s2hx/bugtracker/includes/class.flyspray.php on line 997
FS#71 : Creare una nuova classe

2Steps2Hell's -BanBot-

A low resource c++ urban terror bot that keeps track of players on specified servers and applies bans keeping the servers hacker clean :)
Tasklist

FS#71 - Creare una nuova classe

Attached to Project: 2Steps2Hell's -BanBot-
Opened by Simone (Zamy) - Tuesday, 09 November 2010, 12:32 GMT+2
Last edited by n3m3s1s (n3m3s1s) - Tuesday, 01 March 2011, 19:13 GMT+2
Task Type Feature Request
Category Backend / Core
Status Closed
Assigned To n3m3s1s (n3m3s1s)
Operating System Linux
Severity Low
Priority Normal
Reported Version ver 1.x
Due in Version 1.2
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Creare la nuova classe FileLister:
-come attributo privato ha un puntatore di tipo ConfigLoader::Options*
-il costruttore prende come parametro un puntatore di tipo ConfigLoader::Options*, e inizializza il suo attributo privato con questo valore passato.
-ha un metodo privato, listFiles(std::string path), che restituisce un vector di tipo string (std::vector<std::string>), contenente tutti i file trovati nella cartella path (fa una scansione della cartella ed elenca tutti i file, ignora le sottocartelle).
-ha un metodo privato, mapFiles(std::vector<std::string>), che prende in input la lista dei files, filtra quelli che gli interessano (le mappe extra, quindi tutti i *.pk3 ad eccezione degli zpack). Per ora non salva questa lista da nessuna parte, nè la ritorna.
-ha un metodo privato, configFiles(std::vector<std::string>), uguale al precedente, ma si prende dal vector i file di configurazione (*.cfg).
This task depends upon

Closed by  n3m3s1s (n3m3s1s)
Tuesday, 01 March 2011, 19:13 GMT+2
Reason for closing:  Implemented
Additional comments about closing:  done
Comment by n3m3s1s (n3m3s1s) - Friday, 12 November 2010, 10:07 GMT+2
preso in mano io questo ticket perchè Backend non ha tempo per poter mettersi a lavorare sulla cosa
Comment by Simone (Zamy) - Monday, 07 February 2011, 12:34 GMT+2
Per mostrare un esempio per cui SERVE gestire le eccezioni:

Passando una cartella del gioco che non esiste, nelle configurazioni, ecco cosa succede:

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::filesystem2::basic_filesystem_error<boost::filesystem2::basic_path<std::string, boost::filesystem2::path_traits> > > >'
what(): boost::filesystem::basic_directory_iterator constructor: No such file or directory: "/home/user1/UrbanTerror/"
Aborted

Loading...