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

Comparing deliantra/Deliantra-Client/DC/Protocol.pm (file contents):
Revision 1.144 by root, Fri Aug 3 02:20:32 2007 UTC vs.
Revision 1.145 by root, Mon Aug 6 02:11:45 2007 UTC

21 21
22 my $self = $class->SUPER::new (%arg, 22 my $self = $class->SUPER::new (%arg,
23 setup_req => { 23 setup_req => {
24 extmap => 1, 24 extmap => 1,
25 excmd => 1, 25 excmd => 1,
26 ywidget => 1,#d# 26 xwidget => 1,#d#
27 %{$arg{setup_req} || {}}, 27 %{$arg{setup_req} || {}},
28 }, 28 },
29 ); 29 );
30 30
31 $self->{map_widget}->clr_commands; 31 $self->{map_widget}->clr_commands;
226} 226}
227 227
228sub logprint { 228sub logprint {
229 my ($self, @a) = @_; 229 my ($self, @a) = @_;
230 230
231 $self->{log_fh} ||= do { 231 CFPlus::DB::logprint "$Crossfire::VARDIR/log.$self->{host}" => (join "", @a), sub { };
232 my $path = "$Crossfire::VARDIR/log.$self->{host}";
233
234 open my $fh, ">>:utf8", $path
235 or die "Couldn't open logfile $path: $!";
236
237 $fh->autoflush (1);
238
239 $fh;
240 };
241
242 my ($sec, $min, $hour, $mday, $mon, $year) = localtime time;
243
244 my $ts = sprintf "%04d-%02d-%02d %02d:%02d:%02d",
245 $year + 1900, $mon + 1, $mday, $hour, $min, $sec;
246
247 print {$self->{log_fh}} "$ts ", @a, "\n";
248} 232}
249 233
250sub _stat_numdiff { 234sub _stat_numdiff {
251 my ($self, $name, $old, $new) = @_; 235 my ($self, $name, $old, $new) = @_;
252 236

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines