#! perl cf::register_command chat => 0, sub { my ($who, $msg) = @_; if ($msg) { my $name = $who->name; my $player = cf::player::first; while ($player) { unless ($player->ob->{ext_ignore_shout}) { $player->ob->message ("$name chats: $msg", cf::NDI_BLUE); } $player = cf::player::next $player; } } else { $who->message ("Chat what?", cf::NDI_UNIQUE); } }; cf::register_command shout => 0, sub { my ($who, $msg) = @_; if ($msg) { my $name = $who->name; my $player = cf::player::first; while ($player) { unless ($player->ob->{ext_ignore_shout}) { $player->ob->message ("$name shouts: $msg", cf::NDI_RED); } $player = cf::player::next $player; } } else { $who->message ("Shout what?", cf::NDI_UNIQUE); } };