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

Comparing deliantra/maps/perl/chat.ext (file contents):
Revision 1.23 by root, Fri Jul 21 08:22:02 2006 UTC vs.
Revision 1.25 by root, Fri Jul 21 08:26:59 2006 UTC

271 271
272cf::register_command seen => 0, sub { 272cf::register_command seen => 0, sub {
273 my ($who, $args) = @_; 273 my ($who, $args) = @_;
274 274
275 if (my ($login) = $args =~ /(\S+)/) { 275 if (my ($login) = $args =~ /(\S+)/) {
276 if ($login eq $who->name) {
277 $who->message ("Very funny, $login. Ha. Ha.", cf::NDI_UNIQUE);
276 if (cf::player::find $login) { 278 } elsif (cf::player::find $login) {
277 $who->message ("$login is right here on this server!", cf::NDI_UNIQUE); 279 $who->message ("$login is right here on this server!", cf::NDI_UNIQUE);
278 } elsif (cf::player::exists $login 280 } elsif (cf::player::exists $login
279 and stat sprintf "%s/%s/%s/%s.pl", cf::localdir, cf::playerdir, ($login) x 2) { 281 and stat sprintf "%s/%s/%s/%s.pl", cf::localdir, cf::playerdir, ($login) x 2) {
280 my $time = (stat _)[9]; 282 my $time = (stat _)[9];
281 283
282 $who->message ("$login was last seen here on " 284 $who->message ("$login was last seen here "
283 . (POSIX::strftime "%Y-%m-%d %H:%M:%S +0000", gmtime $time) 285 . (POSIX::strftime "%Y-%m-%d %H:%M:%S +0000", gmtime $time)
284 . " which was " . (int +(time - $time) / 3600) . " hours ago.", cf::NDI_UNIQUE); 286 . " which was " . (int +(time - $time) / 3600) . " hours ago.", cf::NDI_UNIQUE);
285 } else { 287 } else {
286 $who->message ("No player named $login is known to me.", cf::NDI_UNIQUE); 288 $who->message ("No player named $login is known to me.", cf::NDI_UNIQUE);
287 } 289 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines