Skip to content

di/slack-irc-heroku-bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slack/IRC Heroku Bridge

This project will allow you to deploy the aeirola/slack-irc-client project to Heroku to act as an IRC bouncer and as a bridge between IRC and Slack.

This means that a) Your IRC username will always be online, and b) any messages in the channels you join will be forwarded to Slack.

Setup

  1. Create new Slack team at https://slack.com/create

    • Don't invite anyone else to the team
  2. Rename the #general Slack channel to the IRC channel you wish to join.

    • Delete Slack channels that you don't want to join on IRC (like #random)
    • Add any other IRC channels you want to join as new Slack channels
  3. Edit your Slack user profile at https://slack.com/account/profile

    • Set the "What I do field" to JSON formatted string

    • For example, for Freenode, you will need the following:

      {
        "server": "irc.freenode.net",
        "port": 6697,
        "userName": "NICKNAME",
        "nsPassword": "PASSWORD",
        "sasl": true,
        "nick": "NICKNAME",
        "password": "PASSWORD",
        "realName": "Your Real Name",
        "secure": true
      }
    • You may also want to ignore some common IRC actions. Add this to the JSON configuration:

        "muteIrcEvents": ["join", ...]
      

      Valid values for this field are as follows:

      Value Description
      join Mute JOIN messages in the channel
      kick Mute KICK messages in the channel
      kill Mute KILL messages in the channel
      motd Mute MOTD direct messages from slackbot on join
      names Mute membership list in the channel on join
      part Mute PART messages in the channel
      quit Mute QUIT messages in the channel
      topic Don't set the topic in the channel on join
  4. Clone this repository:

    $ git clone git@github.com:di/slack-irc-heroku-bridge.git
    
  5. Create a new Heroku app:

    $ heroku create <SOME APP NAME>
    
  6. Scale down the web dyno:

    $ heroku ps:scale web=0
    
  7. Generate a test token for your newly created team at http://aeirola.github.io/slack-irc-client/

  8. Set an environmental variable for the token you just created:

    $ heroku config:set SLACK_API_TOKEN=<YOUR GENERATED TOKEN>
    
  9. Push the app to heroku:

    git push heroku master
    
  10. Scale up a single worker dyno:

    $ heroku ps:scale worker=1
    

You should start receiving messages from Slackbot and in the Slack channels you've created!

Debugging

To debug, take a look at heroku logs to see if there's any connection issues.

About

IRC Bouncer and bridge to Slack hosted on Heroku

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published