<commit_before># coffea-irc

_irc plugin for [coffea 1.0-beta](https://github.com/caffeinery/coffea/tree/1.0-beta)_


## Setup

 * Make sure to use the latest *beta* version of coffea by running: `npm install --save coffea@beta`
 * Install `coffea-irc`: `npm install coffea-irc`


## Usage

Specify the telegram protocol in your network config:

```js
{
  "protocol": "irc",
  "network": "chat.freenode.net", // required
  "nick": "coffeabot1337", // required
  "channels": [ "#caffeinery" ], // optional
  "prefix": "." // optional, default: !
}
```

coffea will automatically load `coffea-irc` when it's needed! Thus, using irc (or other protocols) this way should work on **any** coffea project, **without any tweaks** (other than installing `coffea-irc` and specifying the config).

`coffea-irc` aims to be compatible with coffea. Of course, features that irc doesn't have (like audio messages) aren't available for irc protocols, they will just
be ignored.


## API

Joining/parting channels:

```js
networks.send({
  type: 'join',
  channel: '#caffeinery',
  password: '<PASSWORD>'
})

networks.send({
  type: 'part',
  channel: '#caffeinery'
})
```

Sending irc commands:

```js
networks.send({
  type: 'send',
  args: [ 'MODE', '#caffeinery', '+v', 'coffeabot1337' ]
})
```
<commit_msg>add formatting example<commit_after># coffea-irc

_irc plugin for [coffea 1.0-beta](https://github.com/caffeinery/coffea/tree/1.0-beta)_


## Setup

 * Make sure to use the latest *beta* version of coffea by running: `npm install --save coffea@beta`
 * Install `coffea-irc`: `npm install coffea-irc`


## Usage

Specify the telegram protocol in your network config:

```js
{
  "protocol": "irc",
  "network": "chat.freenode.net", // required
  "nick": "coffeabot1337", // required
  "channels": [ "#caffeinery" ], // optional
  "prefix": "." // optional, default: !
}
```

coffea will automatically load `coffea-irc` when it's needed! Thus, using irc (or other protocols) this way should work on **any** coffea project, **without any tweaks** (other than installing `coffea-irc` and specifying the config).

`coffea-irc` aims to be compatible with coffea. Of course, features that irc doesn't have (like audio messages) aren't available for irc protocols, they will just
be ignored.


## API

Joining/parting channels:

```js
networks.send({
  type: 'join',
  channel: '#caffeinery',
  password: '<PASSWORD>'
})

networks.send({
  type: 'part',
  channel: '#caffeinery'
})
```

Sending irc commands:

```js
networks.send({
  type: 'send',
  args: [ 'MODE', '#caffeinery', '+v', 'coffeabot1337' ]
})
```


## Colors / Formatting

Not supported by coffea yet, so use [irc-colors](https://www.npmjs.com/package/irc-colors) for now:

```js
import { blue } from 'irc-colors'

networks.on('message', (msg, reply) => reply(message(msg.channel,
  blue("blue text")
)))
```

{'fraction_non_alphanumeric': 0.1608954179783141, 'fraction_numerical': 0.008394543546694649, 'mean_word_length': 4.296296296296297, 'pattern_counts': {'":': 10, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 3, 'lorem ipsum': 0, 'www.': 1, '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': '3414919', 'n_tokens_mistral': 1048, 'n_tokens_neox': 975, 'n_words': 307}