ircredirect

command module
v0.0.0-...-369a627 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

README

IRC Redirect

IRC to MQTT Message Redirection

This is a very simple message broker that will send any messages it receives to a MQTT Topic. To use simple define those environment variables:

  • irc_server => "irc.freenode.com" - The IRC Server to connect
  • irc_nickname => "redbot-XX" - This bot nickname (defaults to redbot-XX)
  • irc_channel => "#ircredirect" - The IRC Channel to Listen Messages
  • mqtt_server => "mosquitto.mosquitto" - The MQTT Server Hostname
  • mqtt_topic => "ircredirect" - The MQTT Topic to send messages

Then this bot will automatically send a JSON message to MQTT Topic in the following format:

{
  "type": "message",
  "from": "nickname",
  "to": "nickname or channel",
  "message": "message sent",
}

A docker image is available at racerxdl/ircredirect:

docker run \
  -e irc_server="irc.freenode.net" \
  -e irc_nickname="mybot" \
  -e irc_channel="#ircredirect" \
  -e mqtt_server="mosquitto"
  -e mqtt_topic="ircredirect" \
  racerxdl/ircredirect

MQTT to IRC Messages

Aditionally, this redirect works in the other way, redirecting messages from MQTT to IRC. It does that by listen on a YOURTOPIC_msg MQTT Topic. For example of mqtt_topic is mymessages, it will listen for inputs in mymessages_msg. You can send a JSON String payload with the following content:

{
  "sendmsg": true,
  "to": "nickname or channel",
  "message": "message to send"
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL