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