Type-safe swiss army knife for bi-directional IRC bridging.
Preferred backend is AMQP using rabbitmq
. See ./nixos/example.nix for
an example NixOS deployment. The ZRE backend, while fully functional is a bit less
reliable and considered experimental. A simple UNIX socket backend
might be added in future.
Use ircbridge-amqp-cat
to send a message to IRC channel or user:
ircbridge-amqp-cat --chan "#bottest" "I'm a bot"
ircbridge-amqp-cat --chan "#bottest" --notice "Sent as a /notice"
ircbridge-amqp-cat --user "@srk" Hi
Use ircbridge-amqp-tail
to print messages received by the bot.
ircbridge-amqp-irccat
offers
irccat compatible layer.
allows to pipe target(s) and message to its stdin, for example:
echo "#bottest Helo" | ircbridge-amqp-irccat
echo "@user Hi" | ircbridge-amqp-irccat
Multiple targets are also supported
echo "#bottest,@user,#chan2 Hi all" | ircbridge-amqp-irccat
It is also possible to pass the default target via --chan
or --user
arugments:
echo "Send to default target" | ircbridge-amqp-irccat --chan "#bottest"
To send message as a notice, use --notice
flag
echo "#bottest Helo" | ircbridge-amqp-irccat --notice
The topic operations are not supported.
Similar to ircbridge-amqp-irccat
but running as a TCP server
on localhost and port 12345
(defaults, can be overriden using
--host
and --port
).
For -tcpserver
, the default target must be supplied beforehand:
ircbridge-amqp-irccat-tcpserver --chan "#bottest"
Now you can send messages using e.g. netcat
:
echo "Ahoy" | nc localhost 12345
echo "@user Hey" | nc localhost 12345
echo "#anotherChannel Non-default chan" | nc localhost 12345
echo "#chan,@user Mutliple recepients" | nc localhost 12345
Uses haskell-zre
. Considered experimental.
Send messages using ircbridge-zre-cat
, usage is similar to ircbridge-amqp-cat
Dump messages received from IRC over ZRE:
ircbridge-zre-tail
or using zrecat
zrecat ircInput
# another terminal
zrecat ircOutput
You can use konsum
from amqp-utils
(nix-shell -p haskellPackages.amqp-utils
)
to inspect the wire format of the AMQP transport:
Show messages received from IRC
konsum -x ircExchange -r irc.amqp
or snoop messages sent to IRC sent by other clients
konsum -x ircExchange -r amqp.irc
Sort of an experiment in extreme modularity which allows reusing
code without pulling in dependencies not required for certain frontends/backends.
For example, amqp
doesn't require zre/zeromq
, nor cereal
dependencies and
zre
doesn't require amqp
, but uses cereal
for serialization.
The separation of concerns is also quite nice, for example ircbridge-ircbot-*
subpackages
use their own set of command line arguments related to IRC network, user information, channels
to join while clients like ircbridge-amqp-cat
only need to know about a target where to
send messages (channel or user).