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.382 by root, Thu Oct 11 00:34:31 2007 UTC vs.
Revision 1.384 by root, Fri Oct 12 18:17:16 2007 UTC

1046 close $fh; 1046 close $fh;
1047 1047
1048 if (@$objs) { 1048 if (@$objs) {
1049 if (my $fh = aio_open "$filename.pst~", O_WRONLY | O_CREAT, 0600) { 1049 if (my $fh = aio_open "$filename.pst~", O_WRONLY | O_CREAT, 0600) {
1050 chmod SAVE_MODE, $fh; 1050 chmod SAVE_MODE, $fh;
1051 my $data = Coro::Storable::nfreeze { version => 1, objs => $objs }; 1051 my $data = Coro::Storable::blocking_nfreeze { version => 1, objs => $objs };
1052 aio_write $fh, 0, (length $data), $data, 0; 1052 aio_write $fh, 0, (length $data), $data, 0;
1053 aio_fsync $fh if $cf::USE_FSYNC; 1053 aio_fsync $fh if $cf::USE_FSYNC;
1054 close $fh; 1054 close $fh;
1055 aio_rename "$filename.pst~", "$filename.pst"; 1055 aio_rename "$filename.pst~", "$filename.pst";
1056 } 1056 }
2896=pod 2896=pod
2897 2897
2898The following functions and methods are available within a safe environment: 2898The following functions and methods are available within a safe environment:
2899 2899
2900 cf::object 2900 cf::object
2901 contr pay_amount pay_player map x y force_find force_add 2901 contr pay_amount pay_player map x y force_find force_add destroy
2902 insert remove name archname title slaying race decrease_ob_nr 2902 insert remove name archname title slaying race decrease_ob_nr
2903 2903
2904 cf::object::player 2904 cf::object::player
2905 player 2905 player
2906 2906
2913=cut 2913=cut
2914 2914
2915for ( 2915for (
2916 ["cf::object" => qw(contr pay_amount pay_player map force_find force_add x y 2916 ["cf::object" => qw(contr pay_amount pay_player map force_find force_add x y
2917 insert remove inv name archname title slaying race 2917 insert remove inv name archname title slaying race
2918 decrease_ob_nr)], 2918 decrease_ob_nr destroy)],
2919 ["cf::object::player" => qw(player)], 2919 ["cf::object::player" => qw(player)],
2920 ["cf::player" => qw(peaceful)], 2920 ["cf::player" => qw(peaceful)],
2921 ["cf::map" => qw(trigger)], 2921 ["cf::map" => qw(trigger)],
2922) { 2922) {
2923 no strict 'refs'; 2923 no strict 'refs';

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines