ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC.pm (file contents):
Revision 1.175 by root, Mon Mar 24 00:24:46 2008 UTC vs.
Revision 1.180 by root, Tue May 6 14:37:13 2008 UTC

15package DC; 15package DC;
16 16
17use Carp (); 17use Carp ();
18 18
19BEGIN { 19BEGIN {
20 $VERSION = '0.9967'; 20 $VERSION = '0.9971';
21 21
22 use XSLoader; 22 use XSLoader;
23 XSLoader::load "Deliantra::Client", $VERSION; 23 XSLoader::load "Deliantra::Client", $VERSION;
24} 24}
25 25
164 164
165 $::CFG = decode_json $CFG; 165 $::CFG = decode_json $CFG;
166} 166}
167 167
168sub write_cfg { 168sub write_cfg {
169 my ($file) = @_; 169 my $file = "$Deliantra::VARDIR/client.cf";
170 170
171 $::CFG->{VERSION} = $::VERSION; 171 $::CFG->{VERSION} = $::VERSION;
172 172
173 open my $fh, ">:utf8", $file 173 open my $fh, ">:utf8", $file
174 or return; 174 or return;
175 print $fh encode_json $::CFG; 175 print $fh JSON::XS->new->utf8->pretty->encode ($::CFG);
176} 176}
177 177
178sub http_proxy { 178sub http_proxy {
179 my @proxy = win32_proxy_info; 179 my @proxy = win32_proxy_info;
180 180

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines