<commit_before>module Lita
  module Handlers

    class IgnoreMe < Handler
      include IgnoreRegistry

      route(/^ignore me$/i, :ignore_me, command: true, help: {
        "ignore me" => t('ignore_help')
      })

      route(/^listen to me$/i, :listen_to_me, command: true, help: {
        "listen to me" => t('listen_help')
      })

      def ignore_me(response)
        source = response.message.source
        name = source.user.name

        if ignored? source
          response.reply t('already_ignored', name: name, room: source.room)
        else
          ignore source
          response.reply t('ignored', name: name, room: source.room)
        end
      end

      def listen_to_me(response)
        source = response.message.source
        name = source.user.name

        if ignored? source
          heed source
          response.reply t('listening', name: name)
        else
          response.reply t('already_listening', name: name)
        end
      end<commit_msg>Displays room name instead of ID on reply<commit_after>module Lita
  module Handlers

    class IgnoreMe < Handler
      include IgnoreRegistry

      route(/^ignore me$/i, :ignore_me, command: true, help: {
        "ignore me" => t('ignore_help')
      })

      route(/^listen to me$/i, :listen_to_me, command: true, help: {
        "listen to me" => t('listen_help')
      })

      def ignore_me(response)
        source = response.message.source
        name = source.user.name
        room = source.room_object.name

        if ignored? source
          response.reply t('already_ignored', name: name, room: room)
        else
          ignore source
          response.reply t('ignored', name: name, room: room)
        end
      end

      def listen_to_me(response)
        source = response.message.source
        name = source.user.name

        if ignored? source
          heed source
          response.reply t('listening', name: name)
        else
          response.reply t('already_listening', name: name)
        end
      end
{'fraction_non_alphanumeric': 0.09877149877149877, 'fraction_numerical': 0.0, 'mean_word_length': 2.0162962962962965, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '4714449', 'n_tokens_mistral': 595, 'n_tokens_neox': 567, 'n_words': 162}