Deliantra-Client
view release on metacpan or search on metacpan
DC/MapWidget.pm view on Meta::CPAN
my $mapname = $::CONN->{map_info}[0];
my $mappath = "$mapdir/$mapname";
-e $mappath and die "$mappath already exists\n";
print "getting map revision for $mapname...\n";
# try to get the most recent head revision, what a hack,
# this should have been returned while downloading *sigh*
my $log = (DC::lwp_check $ua->get ("$editsup->{cvs_root}/$mapname?view=log&logsort=rev"))->decoded_content;
if ($log =~ /\?rev=(\d+\.\d+)"/) {
my $rev = $1;
print "downloading revision $rev...\n";
my $map = (DC::lwp_check $ua->get ("$editsup->{cvs_root}/$mapname?rev=$rev"))->decoded_content;
my $meta = {
%$editsup,
path => $mapname,
revision => $rev,
cf_login => $::PROFILE->{user},
};
require File::Basename;
require File::Path;
DC/MapWidget.pm view on Meta::CPAN
# cf_password => $ENV{CFPLUS_PASSWORD},
# comment => "",
# ]
# );
#
# if ($res->is_error) {
# # fatal condition
# warn $res->status_line;
# } else {
# # script replies are marked as {{..}}
# my @msgs = $res->decoded_content =~ m/\{\{(.*?)\}\}/g;
# warn map "$_\n", @msgs;
# }
} else {
die "viewvc parse error, unable to detect revision\n";
}
}
}
}
sub invoke_button_down {
bin/deliantra view on Meta::CPAN
my $table = $METASERVER->{table};
$table->clear;
$table->add_at (0, 0, my $label = new DC::UI::Label max_w => $WIDTH * 0.8, text => "fetching server list...");
my $ok = 0;
DC::background {
my $ua = DC::lwp_useragent;
DC::background_msg DC::decode_json +(DC::lwp_check $ua->get ($META_SERVER))->decoded_content;
} sub {
my ($msg) = @_;
if ($msg) {
$table->clear;
my @tip = (
"The current number of users logged in on the server.",
"The hostname of the server.",
"The time this server has been running without being restarted.",
"Short information about this server provided by its admins.",
( run in 3.232 seconds using v1.01-cache-2.11-cpan-a9ef4e587e4 )