… | |
… | |
158 | nuke_str $pass; |
158 | nuke_str $pass; |
159 | # password matches, wonderful |
159 | # password matches, wonderful |
160 | my $pl = cf::player::find $user or next; |
160 | my $pl = cf::player::find $user or next; |
161 | $pl->connect ($ns); |
161 | $pl->connect ($ns); |
162 | check_clean_save $pl; |
162 | check_clean_save $pl; |
|
|
163 | $pl->{clean_save} = 1; |
163 | last; |
164 | last; |
164 | } elsif (can_cleanup $buf, $mtime) { |
165 | } elsif (can_cleanup $buf, $mtime) { |
165 | Coro::Timer::sleep 1; |
166 | Coro::Timer::sleep 1; |
166 | |
167 | |
167 | $ns->send_drawinfo ( |
168 | $ns->send_drawinfo ( |
… | |
… | |
307 | if ($_[0] !~ /^[yY]/) { |
308 | if ($_[0] !~ /^[yY]/) { |
308 | $pl->invoke (cf::EVENT_PLAYER_LOGOUT, 1); |
309 | $pl->invoke (cf::EVENT_PLAYER_LOGOUT, 1); |
309 | $pl->deactivate; |
310 | $pl->deactivate; |
310 | $pl->ns->destroy; |
311 | $pl->ns->destroy; |
311 | } else { |
312 | } else { |
312 | cf::async { |
313 | cf::async { $pl->save }; |
313 | $pl->{clean_save} = 1; |
|
|
314 | $pl->save; |
|
|
315 | }; |
|
|
316 | } |
314 | } |
317 | }); |
315 | }); |
318 | }, |
316 | }, |
319 | ); |
317 | ); |
320 | |
318 | |