ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.112 by root, Mon Jan 1 13:31:47 2007 UTC vs.
Revision 1.113 by root, Mon Jan 1 15:32:40 2007 UTC

804 or return; 804 or return;
805 805
806 unless (aio_stat "$filename.pst") { 806 unless (aio_stat "$filename.pst") {
807 (aio_load "$filename.pst", $av) >= 0 807 (aio_load "$filename.pst", $av) >= 0
808 or return; 808 or return;
809 $av = eval { (Storable::thaw <$av>)->{objs} }; 809 $av = eval { (Storable::thaw $av)->{objs} };
810 } 810 }
811 811
812 return ($data, $av); 812 return ($data, $av);
813} 813}
814 814
1262 utf8::encode (my $save = $self->{path}->save_path); 1262 utf8::encode (my $save = $self->{path}->save_path);
1263 aioreq_pri 3; IO::AIO::aio_unlink $save; 1263 aioreq_pri 3; IO::AIO::aio_unlink $save;
1264 aioreq_pri 3; IO::AIO::aio_unlink "$save.pst"; 1264 aioreq_pri 3; IO::AIO::aio_unlink "$save.pst";
1265} 1265}
1266 1266
1267sub rename {
1268 my ($self, $new_path) = @_;
1269
1270 $self->unlink_save;
1271
1272 delete $cf::MAP{$self->path};
1273 $self->{path} = new cf::path $new_path;
1274 $self->path ($self->{path}->path);
1275 $cf::MAP{$self->path} = $self;
1276
1277 $self->save;
1278}
1279
1267sub reset { 1280sub reset {
1268 my ($self) = @_; 1281 my ($self) = @_;
1269 1282
1270 return if $self->players; 1283 return if $self->players;
1271 return if $self->{path}{user_rel};#d# 1284 return if $self->{path}{user_rel};#d#

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines