# porygonz

> IRC/XMPP bot that works

Latest version **0.3.1** (published 2013-05-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install porygonz
pnpm add porygonz
yarn add porygonz
bun add porygonz
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2013-05-31 |
| First published | 2013-04-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 11 |
| Known vulnerabilities | 0 (+5 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | GlitchMr |
| Maintainers | glitchmr |
| Keywords | irc, bot, irc bot, xmpp, jabber, xmpp bot, jabber bot |

## Links

- npm: https://www.npmjs.com/package/porygonz
- Repository: https://github.com/GlitchMr/PorygonZ
- Issues: http://github.com/GlitchMr/PorygonZ/issues
- npm.io page: https://npm.io/package/porygonz

## Dependencies (11)

- [irc](https://npm.io/package/irc.md) ~0.3
- [request](https://npm.io/package/request.md) ~2.21
- [matheval](https://npm.io/package/matheval.md) ~1
- [strsplit](https://npm.io/package/strsplit.md) ~1
- [node-xmpp](https://npm.io/package/node-xmpp.md) ~0.4
- [jugglingdb](https://npm.io/package/jugglingdb.md) ~0.2
- [underscore](https://npm.io/package/underscore.md) ~1.4
- [levenshtein](https://npm.io/package/levenshtein.md) ~1
- [node-random](https://npm.io/package/node-random.md) ~0
- [coffee-script](https://npm.io/package/coffee-script.md) ~1.6
- [underscore.string](https://npm.io/package/underscore.string.md) ~2.3

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.3.1 (latest) — 2013-05-31
- 0.3.0 — 2013-05-31
- 0.2.1 — 2013-05-30
- 0.2.0 — 2013-05-30
- 0.1.1 — 2013-05-08
- 0.1.0 — 2013-04-27

## README

PorygonZ
========

[![Build Status](https://travis-ci.org/GlitchMr/PorygonZ.png?branch=master)](https://travis-ci.org/GlitchMr/PorygonZ)

The simple bot that sort of works. Initially, it was just an IRC bot,
but in later releases it got XMPP support. It contains an IRC server
support, but can be used without IRC (as REPL). Also, it supports XMPP
servers, so you can easily make a bot for Internet Messaging. It's very
configurable by using plugins, and you can even decide whatever command
names are used by the plugin.

## Plugins available

* `randomness`
  * `coin` - throws a coin, while using random.org
* `help`
  * `help` - allows you to read list of commands, and help for the
    command. You can overwrite the help, by changing the `help`
    property of the object.
* `math`
  * `math` - uses `matheval` to solve mathematical problem. Takes three
    configuration arguments, `hex`, `binary`, and `octal`. Those decide
    whatever the calculator shows the results in other bases.
* `version`
  * `version` - shows pointless version information. Yep.
* `tell`
  * `tell` - informs other users when they are away.
  * `tellCheck` - event parser to actually inform users. Needed if you
    want `tell` that actually does work.
* `pug`
  * `pug` - returns a cute puppy. Based on [hubot's implementation]
    (https://github.com/github/hubot/blob/master/src/scripts/pugme.coffee).

## Installation

If you want to use the stable version, use standard `npm install`
command.

    npm install PorygonZ

If you want to use development version, just clone the repository using
`npm`. Following command should be able to install PorygonZ.

    npm install git://github.com/GlitchMr/PorygonZ.git

You will need to write some code to load plugins of IRC bot, and its
servers. The source code already contains one, available in the
[`porygonz.litcoffee.sample`](porygonz.litcoffee.sample) file. You are
encouraged to copy it to some other file ending with `.litcoffee`.

The config file can be put almost anywhere - all it does it running
actual code that was installed by `npm install` command. It's sort of
bootstrap, I would say.

Because the configuration file is written in CoffeeScript, you should
be aware that it cares about indentation. It's also sort of complex,
but it also gives lots of flexibility. If you feel like, you can even
monkey punch things while using CoffeeScript syntax. You generally
shouldn't have to, but sometimes it's needed. Generally, the
configuration file has two things you would have to change.

### Plugins

The first would be list of plugins, and the second would be
the list of containers. By default, PorygonZ contains list of plugins
containing one plugin.

    {version} = require 'PorygonZ/plugins/version'

    plugins =
      version: version()

This imports the plugin file `PorygonZ/plugins/version`, and imports
the function from it called `version`. Every plugin is a function you
should call to get the function. The reason why you have to call it,
is that the plugin can be configured. `version` doesn't have any sort
of configuration, but some plugins, like `math` can have it.

The `plugins` array contains the list of commands and the plugins
mapped to it. If you would like that `version` be called like `ver`,
you could add `ver: version()`.

### Servers

The second would be list of servers. By default, this bot joins
`#botters-test` on Freenode, and enables REPL. Adding the new servers
would be simply adding new entries that follow the pattern. The list
of the channels is array, separated by commas.

The prefix is regular expression. It has to be at beginning of the
message, otherwise bot won't listen. It uses the regular expressions
syntax. To learn more about them, check out
[regular-expressions.info](http://www.regular-expressions.info/).
It contains a short tutorial for regular expressions.

If you still cannot survive regular expressions, you can put string
here. It's less flexible, but it works. Mostly. Please note that
prefixes are only needed for conferences/channels, but they are removed
automatically if you will use them anyway in private messages.

## Running

You need to have CoffeeScript installed globally. After doing that,
you can do just.

    coffee porygonz.litcoffee

---
_Source: https://npm.io/package/porygonz · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
