Grapnel allows announcing Slack-style webhooks to IRC channels, via Limnoria's HTTP server. Currently, only plain text payloads are supported.
Due to technical limitations, installation via Limnoria's PluginDownloader or pip is currently unavailable.
Clone the Git repository somewhere and add the parent directory to your bot's config directories.plugins
setting.
Make sure the directory that you save the plugin to matches the plugin name:
$ git clone https://github.com/jlu5/Limnoria-Grapnel Grapnel
After cloning, you can update your copy of the plugin in place by entering the Grapnel directory and running:
$ git pull
-
Configure the public base URL of your web server:
config plugins.grapnel.baseurl https://address.of.your.bot
-
Create a webhook:
grapnel add [network] [channel]
network
andchannel
default to the current network and channel, if you run this command in a channel.
-
Save the URL generated and plug it into whatever app you want to announce events from.
- Replace
your-cool-app-name
with the name of the sending app; it will be reflected in the output by default - Make sure to keep this link private, as it includes the token!
- Replace
-
Test the webhook: e.g.
$ curl -X POST -d '{"text": "hello world"}' -H 'Content-type: application/json' 'https://address.of.your.bot/grapnel/1?token=xxxxxx&sender=myapp'
grapnel add [<network>] [<channel>]
-- Creates a new Slack-compatible webhook endpoint for a given network + channel.network
andchannel
default to the current network and channel if not specified.grapnel get <webhook ID>
-- Returns metadata and the URL for the webhook ID.grapnel listhooks [<network>] [<channel>]
-- Lists webhooks set on the network + channel pair.network
andchannel
default to the current network and channel if not specified.grapnel remove <webhook ID>
-- Removes the given webhook ID.grapnel resettoken <webhook ID>
-- Regenerates the token for the given webhook ID.
The plugins.grapnel.format
option can be adjusted to change the output format. It supports these fields:
$name
(the sender name from thesender=
part of the URL)$text
- Limnoria's standard substitutions:
$randomInt
$botnick
$today
$now
$randomDate