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

Comparing deliantra/server/ext/chat.ext (file contents):
Revision 1.12 by pippijn, Fri Mar 2 00:29:08 2007 UTC vs.
Revision 1.13 by root, Fri Apr 13 05:32:12 2007 UTC

1017 $pl->message ("No such player or ambiguous name: $target", cf::NDI_UNIQUE); 1017 $pl->message ("No such player or ambiguous name: $target", cf::NDI_UNIQUE);
1018 } 1018 }
1019 } 1019 }
1020}; 1020};
1021 1021
1022cf::register_command seen => sub {
1023 my ($pl, $args) = @_;
1024
1025 if (my ($login) = $args =~ /(\S+)/) {
1026 if ($login eq $pl->name) {
1027 $pl->message ("Very funny, $login. Ha. Ha.", cf::NDI_UNIQUE);
1028 } elsif (cf::player::find_active $login) {
1029 $pl->message ("$login is right here on this server!", cf::NDI_UNIQUE);
1030 } elsif (cf::player::exists $login
1031 and stat sprintf "%s/%s/%s/%s.pl", cf::localdir, cf::playerdir, ($login) x 2) {
1032 my $time = (stat _)[9];
1033
1034 $pl->message ("$login was last seen here "
1035 . (POSIX::strftime "%Y-%m-%d %H:%M:%S +0000", gmtime $time)
1036 . " which was " . (int +(time - $time) / 3600) . " hours ago.", cf::NDI_UNIQUE);
1037 } else {
1038 $pl->message ("No player named $login is known to me.", cf::NDI_UNIQUE);
1039 }
1040 } else {
1041 $pl->message ("Usage: seen <player>", cf::NDI_UNIQUE);
1042 }
1043};
1044

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines