<commit_before>module Vetinari
  module IRC
    def register
      raw "PASS <PASSWORD>}" if @config.password
      raw "NICK #{@config.nick}"
      raw "USER #{@config.username} * * :#{@config.real_name}"
    end

    def rename(nick)
      raw "NICK :#{nick}"
    end

    def away(message = nil)
      if message
        raw "AWAY :#{message}"
      else
        raw "AWAY"
      end
    end

    def back
      away
    end

    def quit(message = nil)
      @quitted = true

      if message
        raw "QUIT :#{message}"
      else
        raw 'QUIT'
      end
    end

    def join(channel_name, key = nil)
      channel = Channel.new(channel_name, @actor)
      channel.join(key)
    end
  end
end<commit_msg>Added Bot#message(receiver, message) comfort message for messaging a channel/user by a given receiver string.<commit_after>module Vetinari
  module IRC
    def register
      raw "PASS <PASSWORD>}" if @config.password
      raw "NICK #{@config.nick}"
      raw "USER #{@config.username} * * :#{@config.real_name}"
    end

    def rename(nick)
      raw "NICK :#{nick}"
    end

    def away(message = nil)
      if message
        raw "AWAY :#{message}"
      else
        raw "AWAY"
      end
    end

    def back
      away
    end

    def quit(message = nil)
      @quitted = true

      if message
        raw "QUIT :#{message}"
      else
        raw 'QUIT'
      end
    end

    def join(channel_name, key = nil)
      channel = Channel.new(channel_name, @actor)
      channel.join(key)
    end

    def message(receiver, message)
      channel = @config.isupport['CHANTYPES'].any? do |chantype|
        receiver.start_with?(chantype)
      end

      if channel
        Channel.new(receiver, @actor).message(message)
      else
        User.new(receiver, @actor).message(message)
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.1056644880174292, 'fraction_numerical': 0.0, 'mean_word_length': 1.99185667752443, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '766045', 'n_tokens_mistral': 596, 'n_tokens_neox': 585, 'n_words': 166}