This is a bot who can connect IRC channels with Telegram chat groups.
Another version of this software is available at bigeagle branch. That version is written by @bigeagle, which include a picture-uploading function that this branch have not implemented yet.
But I may not merge it into master branch, for it is mainly written by @bigeagle. I do not
want to take credit for the work that @bigeagle does. XD
You can choose to use either the two versions of the softeware.
Thanks @bigeagle again for his hard working.
- If you have not used telegram-cli before, run it first, and set the correct phone number to log in.
- Create chat groups using
create_group_chatcommand intelegram-cli, and usedialog_listto check wheather the groups are created successfully. Then exit the client. - Rename the
config.py.exampletoconfig.pyand edit it.- Set
bindingsto bind IRC channels with Telegram chats. Elements inbinddingstuple are tuples with three element, whose first element is IRC channel and the second one is Telegram chat (both chat ID and chat name are acceptable) and the third element is either0or1, if1is set, the channel will not be listed in.listcommand (See.help). blacklistinircis a list which contains some nicks in IRC. The messages of these nicks won't be forwarded to Telegram.
- Set
- Start the
telegram-cliusingtelegram-cli --json -d -P <port>, where<port>is the telegram client port you filled inconfig.pyfile, and-Iis mandatory,-dis optional. - Start the bot using
python3 teleirc.py, then it will join the channels automatically and forwards the messages between Telegram and IRC. - Add the bot as a contact on other Telegram accounts, and send
.helpto it, you can get the information about how to join a chat group, how to change the nick and etc.
- Add restarting function.
- Write comment for the code.
- Use logger instead of print.
This software is released with MIT License. See LICENSE file for more details.