<commit_before>{Robot, Adapter, TextMessage, EnterMessage, LeaveMessage, Response} = require 'hubot'

DotNetServer = require './dotnet'


class DotNet extends Adapter

  send: (envelope, strings...) ->
    @server.sendChat envelope.message.client, str for str in strings

  emote: (envelope, strings...) ->
    @server.sendEmote envelope.message.client, str for str in strings

  reply: (envelope, strings...) ->
    @send envelope, "#{envelope.user.name}: #{str}" for str in strings


  run: ->
    @server = new DotNetServer 8880

    @server.on 'chat', (user, message, client) =><commit_msg>Fix a few adapter issues.<commit_after>{Robot, Adapter, TextMessage, EnterMessage, LeaveMessage, Response} = require 'hubot'

DotNetServer = require './server'


class DotNet extends Adapter

  constructor: ->
    @port = process.env.HUBOT_DOTNET_PORT || 8880
  
  send: (envelope, strings...) ->
    @server.sendChat envelope.message.client, str for str in strings

  emote: (envelope, strings...) ->
    @server.sendEmote envelope.message.client, str for str in strings

  reply: (envelope, strings...) ->
    @send envelope, "#{envelope.user.name}: #{str}" for str in strings


  run: ->
    @server = new DotNetServer @port

    @server.on 'chat', (user, message, client) =>
{'fraction_non_alphanumeric': 0.14072327044025157, 'fraction_numerical': 0.006289308176100629, 'mean_word_length': 3.663003663003663, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 14, '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': '1649841', 'n_tokens_mistral': 407, 'n_tokens_neox': 383, 'n_words': 120}