Coder Social home page Coder Social logo

irc-discord-relay's Introduction

ircDiscordRelay

status Programming Language License: MIT

Github Actions Go report card


General Behaviour

Sending to Discord

  • Discord mentions are converted to a real mention (using the first matching name)
  • IRC formatting will be removed

Sending to IRC

  • Discord mentions are reduced to its name
  • server specific emojis are reduced to its name
  • multi line messages are sent line by line

Configuration

The configuration is a json formatted file. One example configuration is part of this repository.

  • discord - map, required - contains all settings related to the Discord part
    • token - string, required - the bot token
    • channelId - string, required - the channel id where the messages will be send
    • sharing - list of string - the actions which will be shared to IRC, an absence of this will imply to share all actions
      • "message" - discord message
  • irc - map, required - contains all settings related to the IRC part
    • channel - string, required - the IRC channel where the bot connects to
    • nick - string, required - the IRC nick
    • onConnection - list of string - every string will send as a raw message
    • sharing - list of string - the actions which will be shared to Discord, an absence of this will imply to share all actions
      • "message" - discord message
      • "me" - /me messages
      • "join" - joining users
      • "leaving" - leaving users
      • "nick" - nick change
      • "quit" - quiting users (e.g. timeout)
      • "kick" - user got kicked
      • "mode" - a mode changed by another user (this includes e.g. ChanServ!)

Requirements

  • Go (>= 1.16)

Build

  • go build -x -o irc-discord-relay

Update

Pull from git and build again.

Run

  • create a config.json, with their needed values, look into the example for more
  • place the config and the executable in one folder
  • execute with irc-discord-relay -c config.json

Web

https://github.com/IceflowRE/irc-discord-relay

Credits

Third Party

Some code snippets were taken from:

License

Copyright 2018-present Iceflower S ([email protected])

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

irc-discord-relay's People

Contributors

iceflowre avatar linewriter1024 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

irc-discord-relay's Issues

Odd @ mention behaviour.

Passing a message from IRC with a mention and then an empty mention (e.g. @Beha @) will result in the second mention being replaced by someone in the discord.

Add ability to process formatting.

Currently the discord input and output is not formatted, so it appears in raw form and is not translated.
Adding to ability to @ users and display @'s correctly would be very useful.
An example is included:

IRC log:

21:54 <rediscord> <Beha> <@!331517669662654464> nice
21:54 <@behalebabo> uhoh
21:55 <rediscord> <Beha> <@396094340176543755>
21:55 <rediscord> <Beha> <:pzap:396123516875046912>
21:55 <@behalebabo> @Beha

The first two @'s were trying to @ a person in the server. They appeared in IRC like this.
The line with 'pzap' was attempting to use an inline image.
Note that the final @Beha did not notify the user in discord.
--- Edit: @IceflowRE
https://github.com/IceflowRE/irc-discord-relay/tree/discordMention

Preventing impersonation.

Currently people on discord can change their name so that it is identical to someone else when relayed to IRC.

Some option should be added to prevent this, perhaps including the #xxxx tag or using the account name if that's available.

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.