Posted this elsewhere for FoCA & CoFR use, and I know you guys have your map list, but in the spirit of sharing, I post this.
Best,
Bob
-------
Been in a funk this past week, so I wanted to try something different to get my mind elsewhere. Here it is, very hack and probably full of holes. Written and run under ActivePerl for Win, but should be immediately fit for Linux use. Works for me, your mileage may vary. Feel free to use, hack, rewrite or ignore at your leisure.
What does it do?
Logs into your cstrike server, assumes that your path from logging into the server is then to cd cstrike\maps to get to your bsp files. Then reads the contents, spits them out into a text file which you can then paste into a forum post. It contains the formatting and url links to a google search with mapname.zip+download for the viewer, like so:
P&B Map List
as_courthouse (http://www.google.com/search?hl=en&ie=UTF-8&q=as_courthouse.zip+download) as_ghetto (http://www.google.com/search?hl=en&ie=UTF-8&q=as_ghetto.zip+download) as_oilrig (http://www.google.com/search?hl=en&ie=UTF-8&q=as_oilrig.zip+download) as_tundra (http://www.google.com/search?hl=en&ie=UTF-8&q=as_tundra.zip+download) bl_shotgun (http://www.google.com/search?hl=en&ie=UTF-8&q=bl_shotgun.zip+download) cs_52sevilla (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_52sevilla.zip+download)
cs_52villabacho (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_52villabacho.zip+download) cs_747 (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_747.zip+download) cs_arcticbase (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_arcticbase.zip+download) cs_assault (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_assault.zip+download) cs_assault_upc (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_assault_upc.zip+download) cs_assault2k (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_assault2k.zip+download)
cs_backalley (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_backalley.zip+download) cs_beirut (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_beirut.zip+download) cs_bikini (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_bikini.zip+download) cs_boxoffice2k (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_boxoffice2k.zip+download) cs_bro (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_bro.zip+download) cs_bwinter (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_bwinter.zip+download)
cs_club42 (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_club42.zip+download) cs_deagle5 (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_deagle5.zip+download) cs_docks (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_docks.zip+download) cs_duke2k (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_duke2k.zip+download) cs_estate (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_estate.zip+download) cs_havana (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_havana.zip+download)
cs_italy (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_italy.zip+download) cs_militia (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_militia.zip+download) cs_office (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_office.zip+download) cs_place4 (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_place4.zip+download) cs_rio (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_rio.zip+download) cs_shipjack (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_shipjack.zip+download)
cs_siege (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_siege.zip+download) cs_siege_apc (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_siege_apc.zip+download) cs_snowflake (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_snowflake.zip+download) cs_thunder (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_thunder.zip+download) cs_tire (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_tire.zip+download) cs_trkstp (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_trkstp.zip+download)
cs_wildwest_assault (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_wildwest_assault.zip+download) cs_winter_assault (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_winter_assault.zip+download) cs_wpndepot (http://www.google.com/search?hl=en&ie=UTF-8&q=cs_wpndepot.zip+download) de_52andalusia (http://www.google.com/search?hl=en&ie=UTF-8&q=de_52andalusia.zip+download) de_52casco (http://www.google.com/search?hl=en&ie=UTF-8&q=de_52casco.zip+download) de_52castello (http://www.google.com/search?hl=en&ie=UTF-8&q=de_52castello.zip+download)
de_52costadelsol (http://www.google.com/search?hl=en&ie=UTF-8&q=de_52costadelsol.zip+download) de_52lagranja (http://www.google.com/search?hl=en&ie=UTF-8&q=de_52lagranja.zip+download) de_52leon (http://www.google.com/search?hl=en&ie=UTF-8&q=de_52leon.zip+download) de_52mangana (http://www.google.com/search?hl=en&ie=UTF-8&q=de_52mangana.zip+download) de_52puente (http://www.google.com/search?hl=en&ie=UTF-8&q=de_52puente.zip+download) de_52spania (http://www.google.com/search?hl=en&ie=UTF-8&q=de_52spania.zip+download)
de_airstrip (http://www.google.com/search?hl=en&ie=UTF-8&q=de_airstrip.zip+download) de_aztec (http://www.google.com/search?hl=en&ie=UTF-8&q=de_aztec.zip+download) de_aztec3 (http://www.google.com/search?hl=en&ie=UTF-8&q=de_aztec3.zip+download) de_bahrain (http://www.google.com/search?hl=en&ie=UTF-8&q=de_bahrain.zip+download) de_burscheid (http://www.google.com/search?hl=en&ie=UTF-8&q=de_burscheid.zip+download) de_cbble (http://www.google.com/search?hl=en&ie=UTF-8&q=de_cbble.zip+download)
de_centurion (http://www.google.com/search?hl=en&ie=UTF-8&q=de_centurion.zip+download) de_chateau (http://www.google.com/search?hl=en&ie=UTF-8&q=de_chateau.zip+download) de_clan1_mill (http://www.google.com/search?hl=en&ie=UTF-8&q=de_clan1_mill.zip+download) de_clan2_fire (http://www.google.com/search?hl=en&ie=UTF-8&q=de_clan2_fire.zip+download) de_daft (http://www.google.com/search?hl=en&ie=UTF-8&q=de_daft.zip+download) de_dawn (http://www.google.com/search?hl=en&ie=UTF-8&q=de_dawn.zip+download)
de_deadlock (http://www.google.com/search?hl=en&ie=UTF-8&q=de_deadlock.zip+download) de_deep6 (http://www.google.com/search?hl=en&ie=UTF-8&q=de_deep6.zip+download) de_dust (http://www.google.com/search?hl=en&ie=UTF-8&q=de_dust.zip+download) de_dust2 (http://www.google.com/search?hl=en&ie=UTF-8&q=de_dust2.zip+download) de_dustbunnies (http://www.google.com/search?hl=en&ie=UTF-8&q=de_dustbunnies.zip+download) de_frankzoo (http://www.google.com/search?hl=en&ie=UTF-8&q=de_frankzoo.zip+download)
de_frostbound (http://www.google.com/search?hl=en&ie=UTF-8&q=de_frostbound.zip+download) de_gijoe (http://www.google.com/search?hl=en&ie=UTF-8&q=de_gijoe.zip+download) de_gijoe2 (http://www.google.com/search?hl=en&ie=UTF-8&q=de_gijoe2.zip+download) de_heat (http://www.google.com/search?hl=en&ie=UTF-8&q=de_heat.zip+download) de_herrenberg (http://www.google.com/search?hl=en&ie=UTF-8&q=de_herrenberg.zip+download) de_inferno (http://www.google.com/search?hl=en&ie=UTF-8&q=de_inferno.zip+download)
de_keller (http://www.google.com/search?hl=en&ie=UTF-8&q=de_keller.zip+download) de_keller_2k (http://www.google.com/search?hl=en&ie=UTF-8&q=de_keller_2k.zip+download) de_luxor (http://www.google.com/search?hl=en&ie=UTF-8&q=de_luxor.zip+download) de_maya (http://www.google.com/search?hl=en&ie=UTF-8&q=de_maya.zip+download) de_motel_x (http://www.google.com/search?hl=en&ie=UTF-8&q=de_motel_x.zip+download) de_museum (http://www.google.com/search?hl=en&ie=UTF-8&q=de_museum.zip+download)
de_night (http://www.google.com/search?hl=en&ie=UTF-8&q=de_night.zip+download) de_nuke (http://www.google.com/search?hl=en&ie=UTF-8&q=de_nuke.zip+download) de_osaka_beta1 (http://www.google.com/search?hl=en&ie=UTF-8&q=de_osaka_beta1.zip+download) de_outrage (http://www.google.com/search?hl=en&ie=UTF-8&q=de_outrage.zip+download) de_piranesi (http://www.google.com/search?hl=en&ie=UTF-8&q=de_piranesi.zip+download) de_predator (http://www.google.com/search?hl=en&ie=UTF-8&q=de_predator.zip+download)
de_prodigy (http://www.google.com/search?hl=en&ie=UTF-8&q=de_prodigy.zip+download) de_prodigy2k (http://www.google.com/search?hl=en&ie=UTF-8&q=de_prodigy2k.zip+download) de_railroad (http://www.google.com/search?hl=en&ie=UTF-8&q=de_railroad.zip+download) de_rats (http://www.google.com/search?hl=en&ie=UTF-8&q=de_rats.zip+download) de_ratsxl (http://www.google.com/search?hl=en&ie=UTF-8&q=de_ratsxl.zip+download) de_rock (http://www.google.com/search?hl=en&ie=UTF-8&q=de_rock.zip+download)
de_rotterdam (http://www.google.com/search?hl=en&ie=UTF-8&q=de_rotterdam.zip+download) de_scud_2k1 (http://www.google.com/search?hl=en&ie=UTF-8&q=de_scud_2k1.zip+download) de_silentoperation (http://www.google.com/search?hl=en&ie=UTF-8&q=de_silentoperation.zip+download) de_simpsons (http://www.google.com/search?hl=en&ie=UTF-8&q=de_simpsons.zip+download) de_storm (http://www.google.com/search?hl=en&ie=UTF-8&q=de_storm.zip+download) de_storm2 (http://www.google.com/search?hl=en&ie=UTF-8&q=de_storm2.zip+download)
de_survivor (http://www.google.com/search?hl=en&ie=UTF-8&q=de_survivor.zip+download) de_torn (http://www.google.com/search?hl=en&ie=UTF-8&q=de_torn.zip+download) de_tot (http://www.google.com/search?hl=en&ie=UTF-8&q=de_tot.zip+download) de_train (http://www.google.com/search?hl=en&ie=UTF-8&q=de_train.zip+download) de_vegas (http://www.google.com/search?hl=en&ie=UTF-8&q=de_vegas.zip+download) de_vertigo (http://www.google.com/search?hl=en&ie=UTF-8&q=de_vertigo.zip+download)
de_winterdust (http://www.google.com/search?hl=en&ie=UTF-8&q=de_winterdust.zip+download) de_winternuke (http://www.google.com/search?hl=en&ie=UTF-8&q=de_winternuke.zip+download) dm_sgarena (http://www.google.com/search?hl=en&ie=UTF-8&q=dm_sgarena.zip+download) es_trinity (http://www.google.com/search?hl=en&ie=UTF-8&q=es_trinity.zip+download) fy_pumpalley (http://www.google.com/search?hl=en&ie=UTF-8&q=fy_pumpalley.zip+download) mindmaze (http://www.google.com/search?hl=en&ie=UTF-8&q=mindmaze.zip+download)
scoutzknivez (http://www.google.com/search?hl=en&ie=UTF-8&q=scoutzknivez.zip+download) slap_pistols (http://www.google.com/search?hl=en&ie=UTF-8&q=slap_pistols.zip+download) speedball2k1 (http://www.google.com/search?hl=en&ie=UTF-8&q=speedball2k1.zip+download) treefort1 (http://www.google.com/search?hl=en&ie=UTF-8&q=treefort1.zip+download)
Total maps: 112
#!/usr/bin/perl
use Net::FTP;
$host="ip";
$username="username";
$password="pass";
$servername="Your Server Here";
$remotedir1="/cstrike/maps";
my $ftp = Net::FTP->new("$host") or die "Can't connect: $@\n";
$ftp->login($username, $password) or die "Couldn't login\n";
$ftp->cwd("$remotedir1") or die "Couldn't change directory to $remotedir1\n";
$PWD=$ftp->pwd;
$out="$servername_mapslist.txt";
open OUT, ">$out" or die "Cannot open $out for write :$!";
print OUT "[b]$servername Map List[/b]\n\n";
print"$PWD\n";
$ftp->type('I');
$LOGDOESNOTEXIST=3;
my @LOGFiles = $ftp->ls();
$total=0;
$zip="zip";
$tempname="";
$URLend="[/url]";
$download="+download";
foreach $LOGfile (@LOGFiles)
{
$tempname=$LOGfile;
chop $tempname;
chop $tempname;
chop $tempname;
chop $tempname;
if ($LOGfile=~"bsp")
{
if ($LOGfile!~"ztmp")
{
print OUT "[url=http://www.google.com/search?hl=en&ie=UTF-8&q=$tempname.$zip$download]$tempname$URLend";
$counter++;
$total++;
}
}
if ($counter<6)
{
print OUT " ";
}
if ($counter==6)
{
print OUT "\n";
$counter=0;
}
}
print OUT "\n\nTotal maps: $total\n\n";
Needs PERL to run. Save as a *.pl script and run as needed. Edit the top variables to match your server's ftp info.
N1 RB.
I've used ASP to put our current rotations on our website but I'm gonna steal your excellent Google search idea. :thumb: