<commit_before><commit_msg>Use old say command code as template.<commit_after>var l10n_file = __dirname + '/../l10n/commands/tell.yml';
var l10n = require('../src/l10n')(l10n_file);
var CommandUtil = require('../src/command_util').CommandUtil;
exports.command = function(rooms, items, players, npcs, Commands) {
  return function(args, player) {
    if (args) {
      player.sayL10n(l10n, 'YOU_SAY', args);
      players.eachIf(function(p) {
        return otherPlayersInRoom(p);
      }, function(p) {
        if (p.getName() != player.getName())
          p.sayL10n(l10n, 'THEY_SAY', player.getName(), args);
      });
      return;
    }

    player.sayL10n(l10n, 'NOTHING_SAID');
    return;
  }

  function otherPlayersInRoom(p) {
    if (p)
      return (p.getName() !== player.getName() && p.getLocation() === player.getLocation());
  };


};
{'fraction_non_alphanumeric': 0.17314487632508835, 'fraction_numerical': 0.02591283863368669, 'mean_word_length': 3.292929292929293, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4845008', 'n_tokens_mistral': 316, 'n_tokens_neox': 297, 'n_words': 54}