ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/chat.ext
Revision: 1.2
Committed: Sun May 7 07:57:04 2006 UTC (18 years ago) by root
Branch: MAIN
Changes since 1.1: +10 -16 lines
Log Message:
minor changes

File Contents

# User Rev Content
1 pippijn 1.1 #! perl
2 root 1.2
3     cf::register_command chat => 0, sub {
4 pippijn 1.1 my ($who, $msg) = @_;
5    
6     if ($msg) {
7     my $name = $who->name;
8    
9 root 1.2 for my $player (cf::player::list) {
10     $player->ob->message ("$name chats: $msg", cf::NDI_BLUE)
11     unless $player->ob->{ext_ignore_shout};
12 pippijn 1.1 }
13 root 1.2
14 pippijn 1.1 } else {
15     $who->message ("Chat what?", cf::NDI_UNIQUE);
16     }
17     };
18    
19 root 1.2 cf::register_command shout => 0, sub {
20 pippijn 1.1 my ($who, $msg) = @_;
21    
22     if ($msg) {
23     my $name = $who->name;
24    
25 root 1.2 for my $player (cf::player::list) {
26     $player->ob->message ("$name shouts: $msg", cf::NDI_RED)
27     unless $player->ob->{ext_ignore_shout};
28 pippijn 1.1 }
29     } else {
30     $who->message ("Shout what?", cf::NDI_UNIQUE);
31     }
32    
33     };