Coder Social home page Coder Social logo

chatrelay's Introduction

Chat Bridging Relay

Relays messages between different chat services.

Currently supported connection methods:

  • IRC client
  • Unreal IRCd server
  • Slack bot

In progress:

  • Matrix

You can configure an arbitrary number of connections, and route messages between any/all of them. Take a look at config-example.yaml for more details.

The model is flexible enough to support any service with a concept of users, channels/rooms, and messages. Contributions welcome.

Adding a protocol

Protocol names are mapped to a specific module and object in the protocols dictionary in the config file. You can add protocols from any importable module.

These objects must define an init_connection() method, which accepts a parsed entry from the servers list in the config file. Calling this method must add an entry to the chatrelay.servers dictionary (in memory), mapping the name config property to another object.

These objects must define a relay_message() method. This must accept 2 or 4 arguments: destchan, message, [fromnick], [fromserver]. If the last 2 arguments are omitted, the message should be treated as a service message, such as notice of a connection failure. Otherwise, its a normal user message. The fromserver argument is the name of the connection from which the message originated, and can be used to disambiguate the nickname if needed.

Upon receipt of a message, you should interpret your configured channel_map dictionary, calling relay_message() on the appropriate objects in chatrelay.servers.

chatrelay's People

Watchers

James Cloos avatar Alex Shafer avatar

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.