Giter Site home page Giter Site logo

tg-irc-relay's Introduction

Telegram-IRC Relay Bot

A lightweight Telegram-IRC relay bot written in Python. It won't eat messages or memory.

Run: python3 relay.py [-d]

-d for debug mode.

Deprecated

Check out the simple branch of orizonhub instead. This branch removes unnecessarily bloated functions, like this project and the tg-chatdig project.

Config

The config file must be config.json, see the example. You must disable the privacy mode for your bot.

  • botid: The number in the token before :
  • botname: Your bot's name
  • groupid: The Telegram group id to be forwarded. To get it, enable debug mode -d, add your bot into the group, say something in the group, and copy the 'message'/'chat'/'id' from the "Msg arrived" line (without -). This ID MUST be positive.
  • groupname: The group's name
  • i2t: true/false, Enable/disable IRC to Telegram forwarding
  • ircignore: Ignore users that match the regex. Don't be empty, use "^$" to disable.
  • ircbotid: The ID of the bot which forwards messages. Usually it should be the same as botid, except that there is another bot responsible for this.
  • ircbotname: The name (in Telegram) of the forwarding bot. Usually it should be the same as botname
  • ircchannel: The IRC channel to forward
  • ircnick: The bot's nickname in IRC
  • ircport, ircserver, ircssl, ircpass: How to connect to the IRC server. ircpass is optional, can be blank.
  • offset: Use 0 for the first time, don't manually change it after
  • shownick: true/false, Enable/disable prefixing of messages sent to Telegram with the IRC nick of the sender (enabled by default)
  • t2i: true/false, Enable/disable Telegram to IRC forwarding
  • token: Your bot's token
  • servemedia (Optional): Can be "" or "self" or "vim-cn".
  • cachepath (When "servemedia" is not empty): Where should the images be stored. YOU are responsible for clearing this directory. (eg. set up a cron job of find $CACHEPATH -type f -mtime +1 -delete.)
  • serveurl (When "servemedia" is "self"): The url prefix where the images can be retreived from your server, which should be an alias of cachepath.

See also

tg-irc-relay's People

Contributors

gumblex avatar peterfeicht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

tg-irc-relay's Issues

Error running bot

Getting the following error, can you help?

Omnimushu@masteruk:~/tg-irc-relay$ python3 relay.py
Traceback (most recent call last):
File "relay.py", line 47, in
USERAGENT = 'TgIRCRelay/%s %s' % (version, HSession.headers["User-Agent" ])
KeyError: 'User-Agent'

no connecting to some irc servers

im having as issue with some server. irc bot is not entering to channel. freenode server works fine. but in some other servers are not working. u can check this server irc.zenet.org.

Normal: irc.zenet.org
IPv6: ipv6.zenet.org
SSL: ssl.zenet.org

Normal port: 6667
SSL port: 6697

i2t not working

Messages from Telegram are relayed to IRC channel, but the vice versa is not true.

Connecting to irc.quakenet.org

Hi,

i tried to connect with the following values within the config file to quakenet:
"ircnick": "irc2telegram",
"ircpass": "",
"ircport": 6667,
"ircserver": "irc.quakenet.org",
"ircssl": false,
"offset": 0,
"shownick": true,

Changing port to 6697 and server to freenode works perfectly using ircssl: true. Any ideas?

br,
antidote

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.