https://github.com/hackndo/slack-irc-sync
Python synchronization between IRC and Slack
https://github.com/hackndo/slack-irc-sync
Last synced: 12 months ago
JSON representation
Python synchronization between IRC and Slack
- Host: GitHub
- URL: https://github.com/hackndo/slack-irc-sync
- Owner: Hackndo
- License: gpl-2.0
- Created: 2017-11-17T12:17:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-05T14:18:21.000Z (over 8 years ago)
- Last Synced: 2024-12-30T21:41:55.485Z (over 1 year ago)
- Language: Python
- Size: 16.6 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Slack-IRC Synchronization
Description
-----------
**Python3.5+** implementation of a synchronization between IRC and Slack

Requirements
------------
* Python 3.5+
* Slack bot
Slack Bot
-----------
Go to [Create new Bot User](https://my.slack.com/services/new/bot)
Initialization
--------------
```sh
git clone git@github.com:Hackndo/slack-irc-sync.git
cd slack-irc-sync
mkvirtualenv slackirc -p $(which python3)
pip install -r requirements.txt
```
Configuration
-------------
Copy configuration template
```sh
cp config/config.json.dist config/config.json
```
Configuration file looks like this
```javascript
{
"irc": {
"server": "irc.server.com", // IRC Server
"port": "6667", // IRC Port
"ssl": false, // Use SSL
"channel": "#channel", // IRC Channel
"nickname": "h_bot", // Bot Nickname
"owner": "username", // Bot Owner Nickname (admin commands)
"log_events": true // Send part/join/kick/quit to slack
},
"slack": {
"channel": "", // Slack Channel ID
"bot_id": "", // Slack Bot user ID
"bot_name": "irc-sync", // Slack Bot Nickname
"token": "", // Slack Bot Token
"owner": "username", // Slack Bot Owner username (admin commands)
"cmd_prefix": "!", // Channel commands prefix (if any)
"output_msg": "<:username:> :message:", // Message format when Slack message is received
"output_cmd": "CMD by :username:", // Message format when Slack command is received
"log_events": true // Send part/join/kick/quit to IRC
},
"formatting": {
"irc_to_slack": false, // Keep bold|underline|italic from IRC to Slack
"slack_to_irc": true // Keep bold|underline|italic from Slack to IRC
}
}
```
Usage
-----
```
(slackirc) pixis@kali:~/Tools/slack-irc-sync $ python slack-irc-sync.py
[IRC] Logged in as:
[IRC] hacknbot
[Slack] Logged in as:
[Slack] irc-sync
[Slack] : Can you hear me IRC Tom? 😃
[IRC] : Yes, I can
```
TODO
----
- [X] Format message from Slack to IRC
- [X] Format message from IRC to Slack : Difficult because not everything is possible, especially when formatting is overlapping
- [ ] Multi channel
- [ ] Multi server
- [ ] Dynamically relaod conf when changed
- [ ] Change conf with IRC or Slack commands