descriptionA gateway that allows connecting from an IRC client to Telegram as a regular user (not bot)
last changeSun, 28 Apr 2024 19:45:06
darcs url
project url
2024-04-28 E. Bosch Update copyright year in LICENSE
2024-04-28 E. Bosch README update
2024-04-28 E. Bosch utils: Fix when a filename has no extension
2024-04-27 E. Bosch exclam: Add command indicator to error messages
2024-04-21 E. Bosch README update
2024-04-21 E. Bosch exclam: !upl: Add support for HTTP/HTTPS URL for file upload
2024-04-19 E. Bosch service: Disable by now the help for subcommands "archive" and "delete" from
2024-04-14 E. Bosch exclam: Add upload (!upl) command to upload files/media to chats/channels
2024-04-14 E. Bosch telegram: Use directory ".cache/irgramd/media" instead of
2024-04-07 E. Bosch telegram: Fix a corner case in forward handler when saved_from_peer is not p ...
2024-04-07 E. Bosch README update
2024-04-07 E. Bosch exclam: Add forward (!fwd) command to forward messages to other channels or ...
2023-12-31 E. Bosch README update
2023-12-20 E. Bosch Fix logging system. ...
2023-12-18 E. Bosch telegram, utils: Replace invalid characters in filenames with number sequenc ...

irgramd - IRC <-> Telegram Gateway

irgramd is a gateway that allows connecting from an IRC client to Telegram as a regular user (not bot).

irgramd is written in python (version 3), it acts as an IRC server where an IRC client can connect and on the other side it's a Telegram client using the Telethon library.

irgramd primary repository is in darcs version control system, github is used as project management and secondary repository

irgramd was forked from pbui/irtelegramd, was heavily modified and currently is a project on its own

irgramd is under active development in alpha state, though usable, several planned features are not implemented yet

How it works

Configure your IRC client to connect to irgramd (running on the same host or on a remote host) then you will see in your IRC client the Telegram groups as IRC channels and Telegram users as IRC users, if you send a message to a user or channel in IRC it will go to the corresponding user or group in Telegram, and the same from Telegram to IRC.

The users on Telegram using the official or other clients will see you with your regular Telegram user account and will be indistinguishable for them whether you are using irgramd or another Telegram client.

Several IRC clients can connect to irgramd but they will see the same Telegram account, this allows connecting to the same Telegram account from different IRC clients on different locations or devices, so one irgramd instance only connects to one Telegram account, if you want to connect to several Telegram accounts you will need to run several irgramd instances. If all IRC clients are disconnected, irgramd will remain connected to Telegram.

irgramd can also be seen as a kind of bouncer (BNC), with the difference that instead of talking IRC protocol on the client side, it talks Telegram protocol (MTProto), and can hide the IP and location of the IRC client (if executed in a different host).




From darcs

darcs clone
chmod +x irgramd/irgramd

From git

git clone
chmod +x irgramd/irgramd


From irgramd directory ./irgramd --help will show all configuration options available, these options can be used directy in the command line or in a file.

When used in command line the separator is - (dash) with two leading dashes, example: --api-hash.

When used in a file the separator is _ (underscore) without two leading dashes nor underscores, example: api_hash. The syntax of this file is just Python so strings are surrounded by quotes (') and lists by brackets ([]).

A sample of the configuration file is provided, copy it to the default configuration location:

mkdir -p  ~/.config/irgramd
cp irgramd/irgramdrc.sample ~/.config/irgramd/irgramdrc

And modified it with your API IDs and preferences.


From irgramd directory, in foreground:


In background (with logs):

./irgramd --log-file=irgramd.log &


PAM authentication: it allows to authenticate IRC users from the system in Unix/Linux. The user that executes irgramd must have permissions to use PAM (e.g. in Linux be in the shadow group or equivalent). The dependency is totally optional, if not used, the module pyPAM is not needed.

Inspired by


Copyright (c) 2019 Peter Bui
Copyright (c) 2020-2024 E. Bosch

Use of this source code is governed by a MIT style license that can be found in the LICENSE file included in this project.