ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/login.ext
(Generate patch)

Comparing deliantra/server/ext/login.ext (file contents):
Revision 1.11 by root, Sun Jan 7 02:39:14 2007 UTC vs.
Revision 1.12 by root, Sun Jan 7 21:54:59 2007 UTC

255 last; 255 last;
256 } 256 }
257 }); 257 });
258} 258}
259 259
260# "Quitting will delete your character PERMANENTLY. If you are sure you want to do this, then use the quit_character command instead of quit." 260cf::register_command quit => sub {
261# "Quitting will delete your character.\nAre you sure you want to quit (y/n):" 261 my ($ob, $arg) = @_;
262# quit, quit_character, save 262
263 $ob->reply (undef,
264 "Quitting will delete your character PERMANENTLY: It will be gone forever and any progress will be lost. "
265 . "If you are sure you want to do this, then use the quit_character command instead of quit.",
266 cf::NDI_UNIQUE | cf::NDI_RED);
267};
268
269cf::register_command quit_character => sub {
270 my ($ob, $arg) = @_;
271
272 my $pl = $ob->contr;
273
274 $pl->ns->query (cf::CS_QUERY_SINGLECHAR, "Do you want to PERMANENTLY delete your character and all associated data (y/n)?", sub {
275 if ($_[0] !~ /^[yY]/) {
276 $ob->reply (undef,
277 "Ok, not not quitting then.",
278 cf::NDI_UNIQUE | cf::NDI_RED);
279 } else {
280 $ob->reply (undef,
281 "Ok, quitting, hope to see you again.",
282 cf::NDI_UNIQUE | cf::NDI_RED);
283 $pl->ns->flush;
284 $pl->quit_character;
285 }
286 });
287};
263 288
264cf::object->attach ( 289cf::object->attach (
265 type => cf::SAVEBED, 290 type => cf::SAVEBED,
266 on_apply => sub { 291 on_apply => sub {
267 my ($bed, $ob) = @_; 292 my ($bed, $ob) = @_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines