nwitch (and slate-irc) plugin for base64 encoding and decoding.
05:34 <KenanY> !base64 encode Hello World
05:34 <nwitch> KenanY: SGVsbG8gV29ybGQ=
05:35 <KenanY> !base64 decode SGVsbG8gV29ybGQ=
05:35 <nwitch> KenanY: Hello World
As a nwitch plugin (using config.toml
):
[plugins]
nwitch-base64 = true
Or through nwitch's API:
var Nwitch = require('nwitch');
var nwitchBase64 = require('nwitch-base64');
var nwitch = new Nwitch({
irc: {
address: 'irc.freenode.org',
port: 6667
}
});
nwitch.use(nwitchBase64());
Technically, all nwitch plugins are just slate-irc plugins, so you could also use this as a slate-irc plugin:
var net = require('net');
var irc = require('slate-irc');
var nwitchBase64 = require('nwitch-base64');
var stream = net.connect({
port: 6667,
host: 'irc.freenode.org'
});
var client = irc(stream);
client.use(nwitchBase64());
$ npm install nwitch-base64
var nwitchBase64 = require('nwitch-base64');
Returns a function that accepts an instance of slate-irc.