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