--- deliantra/server/ext/commands.ext 2008/09/22 01:33:09 1.70 +++ deliantra/server/ext/commands.ext 2008/09/23 00:24:52 1.71 @@ -55,24 +55,26 @@ cf::register_command seen => sub { my ($pl, $args) = @_; - if (my ($login) = $args =~ /(\S+)/) { - if ($login eq $pl->name) { - $pl->message ("Very funny, $login. Ha. Ha.", cf::NDI_REPLY); - } elsif (cf::player::find_active $login) { - $pl->message ("$login is right here on this server!", cf::NDI_REPLY); - } elsif (cf::player::exists $login - and stat cf::player::path $login) { - my $time = (stat _)[9]; + cf::async { + if (my ($login) = $args =~ /(\S+)/) { + if ($login eq $pl->name) { + $pl->message ("Very funny, $login. Ha. Ha.", cf::NDI_REPLY); + } elsif (cf::player::find_active $login) { + $pl->message ("$login is right here on this server!", cf::NDI_REPLY); + } elsif (cf::player::exists $login + and stat cf::player::path $login) { + my $time = (stat _)[9]; - $pl->message ("$login was last seen here " - . (POSIX::strftime "%Y-%m-%d %H:%M:%S +0000", gmtime $time) - . " which was " . (int +(time - $time) / 3600) . " hours ago.", cf::NDI_REPLY); + $pl->message ("$login was last seen here " + . (POSIX::strftime "%Y-%m-%d %H:%M:%S +0000", gmtime $time) + . " which was " . (int +(time - $time) / 3600) . " hours ago.", cf::NDI_REPLY); + } else { + $pl->message ("No player named $login is known to me.", cf::NDI_REPLY); + } } else { - $pl->message ("No player named $login is known to me.", cf::NDI_REPLY); + $pl->message ("Usage: seen ", cf::NDI_REPLY); } - } else { - $pl->message ("Usage: seen ", cf::NDI_REPLY); - } + }; }; cf::register_command body => sub {