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.145 by root, Sun Jan 7 21:54:59 2007 UTC vs.
Revision 1.149 by root, Mon Jan 8 14:11:05 2007 UTC

118 utf8::encode $msg; 118 utf8::encode $msg;
119 119
120 $msg .= "\n" 120 $msg .= "\n"
121 unless $msg =~ /\n$/; 121 unless $msg =~ /\n$/;
122 122
123 LOG llevError, "cfperl: $msg"; 123 LOG llevError, $msg;
124 }; 124 };
125} 125}
126 126
127@safe::cf::global::ISA = @cf::global::ISA = 'cf::attachable'; 127@safe::cf::global::ISA = @cf::global::ISA = 'cf::attachable';
128@safe::cf::object::ISA = @cf::object::ISA = 'cf::attachable'; 128@safe::cf::object::ISA = @cf::object::ISA = 'cf::attachable';
1132 1132
1133 my $path = path $pl; 1133 my $path = path $pl;
1134 my $guard = cf::lock_acquire "user_save:$path"; 1134 my $guard = cf::lock_acquire "user_save:$path";
1135 1135
1136 return if $pl->{deny_save}; 1136 return if $pl->{deny_save};
1137
1138 Coro::AIO::aio_mkdir playerdir $pl, 0770;
1137 $pl->{last_save} = $cf::RUNTIME; 1139 $pl->{last_save} = $cf::RUNTIME;
1138 1140
1139 Coro::cede;
1140 $pl->save_pl ($path); 1141 $pl->save_pl ($path);
1141 Coro::cede; 1142 Coro::cede;
1142} 1143}
1143 1144
1144sub new($) { 1145sub new($) {
1679 $map = $map->customise_for ($self) if $map; 1680 $map = $map->customise_for ($self) if $map;
1680 1681
1681# warn "entering ", $map->path, " at ($x, $y)\n" 1682# warn "entering ", $map->path, " at ($x, $y)\n"
1682# if $map; 1683# if $map;
1683 1684
1685 $map or $map->cluck ("oy");#d#
1684 $map or $self->message ("The exit is closed", cf::NDI_UNIQUE | cf::NDI_RED); 1686 $map or $self->message ("The exit to '" . ($path->visible_name) . "' is closed", cf::NDI_UNIQUE | cf::NDI_RED);
1685 1687
1686 $self->leave_link ($map, $x, $y); 1688 $self->leave_link ($map, $x, $y);
1687 })->prio (1); 1689 })->prio (1);
1688} 1690}
1689 1691
2097 $cf::map::MAX_RESET = $CFG{map_max_reset} if exists $CFG{map_max_reset}; 2099 $cf::map::MAX_RESET = $CFG{map_max_reset} if exists $CFG{map_max_reset};
2098 $cf::map::DEFAULT_RESET = $CFG{map_default_reset} if exists $CFG{map_default_reset}; 2100 $cf::map::DEFAULT_RESET = $CFG{map_default_reset} if exists $CFG{map_default_reset};
2099 2101
2100 if (exists $CFG{mlockall}) { 2102 if (exists $CFG{mlockall}) {
2101 eval { 2103 eval {
2102 $CFG{mlockall} ? &mlockall : &munlockall 2104 $CFG{mlockall} ? eval "mlockall()" : eval "munlockall()"
2103 and die "WARNING: m(un)lockall failed: $!\n"; 2105 and die "WARNING: m(un)lockall failed: $!\n";
2104 }; 2106 };
2105 warn $@ if $@; 2107 warn $@ if $@;
2106 } 2108 }
2107} 2109}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines