Giter VIP home page Giter VIP logo

heisenbridge's People

Contributors

9p4 avatar blastrock avatar btbn avatar christoph-d avatar erebion avatar fourstepper avatar hades avatar hashworks avatar hifi avatar lnicola avatar mweinelt avatar nicolaisoeborg avatar peetz0r avatar piegamesde avatar pstn avatar russss avatar spantaleev avatar sumnerevans avatar szczot3k avatar tetov avatar tjaderxyz avatar tohojo avatar viiru- 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar

heisenbridge's Issues

Cleanup rooms properly

  1. Invalidate room
  2. Remove puppets (slowly, we're not in a hurry)
  3. Leave room
  4. Forget room
  5. Profit!

This process can be restarted/continued on bridge startup as an invalid room will always be eligible for garbage collection, we just need to avoid leaving it ourselves until all puppets have been kicked.

Correct AUTOCMD example

Hi,

Thanks for Heisenbridge!

The AUTOCMD -h output includes:

Example: AUTOCMD msg [email protected] :auth foo bar

This is a bit confusing, and the msg syntax wasn't working for me. I had to use this for a Nickserv network:

AUTOCMD PRIVMSG nickserv :identify mynick mypassword

So, PRIVMSG instead of msg, and no @... as part of the nick.

Handle replies somehow

Possibly prepend the message with the original sender so it looks somewhat follow-able on IRC?

Implement backoff to ERROR disconnect loop

Some networks like QuakeNet really dislike a lot of connection attempts at the same time and start to throttle. Currently there is no backoff for ERROR disconnects and it will reconnect in 10 seconds

Implement backoff and some randomization so all bridge users won't connect at the same time.

IRC flood prevention

Need a per connection queue with a timer and a penalty system to allow bursting but not so much to cause an excess flood.

Priority commands should be possible to LIFO.

automode support

I would like to have Heisenbridge automatically giving ops (or voices in some cases) to users whose hostmasks I specify especially in IRCnet where there is no ChanServ. I think it should have option for width to either do it on specific channels or in case the hostmask belongs to user themself on all channels.

Sometimes ghosting do in fact happen

I don't have exact raw IRC logs but I've seen people who have joined and left and then rejoined immediately again or changed nicks may have been left out.

This may be that the members of a room are inconsistently managed by hand and not reacted to Matrix events, possibly.

Detect dead connections

It seems the underlying IRC library does not do its own PING/PONG if the connection is idle. This inhibits an unwanted behavior of the socket disconnecting only when the user initiates an action that sends something over the socket.

This should probably be part of either HeisenConnection or HeisenReactor.

Feature request: add ZWSP after the first letter of username and domain

ZWSP is a zero-width space and having it in the messages sent by the relaybot would avoid pinging users on IRC when they have the same nick on both sides. E.g. on the main room I am @mikaela:feneas.org and on LiberaChat I am Mikaela so I get pinged whenever I say something at Matrix.

I would like the bot to refer to me as @mZWSPikaela:fZWSPeneas.org, so I wouldn't get pinged even if my MXID contained my domain (I would likely be @mikaela:mikaela.info if I was running my own homeserver and such MXIDs aren't uncommon).

Implement identd

We know our own sockets well enough we can actually work as an identd service.

Implement IRC client presence (with caveats)

It would look a lot better if everyone who are on a channel show up "online" rather than "unavailable". We can update the presence status to "offline" if we see a client quit but it's really a best effort as it's only visible to you if that happens on a channel you're in.

The very least we should set all users online that we know are currently on a channel. This can be flushed through a slow background queue.

Detect HS downtime and reconnect properly

If our requests to HS start failing in numbers redo the initial connection dance and send NAMES to all channels once we have reconnected.

This ensures we are in sync between IRC and Matrix.

Support arbitrary commands on connect

On some networks, for instance, I'd send MODE mynick +R to prevent myself from getting spam. It would be great to be able to send more than one command on connect (beyond just the one to identify to nickserv). Thanks!

`@mentions` are not mapped and only work if displayname matches

From Matrix to IRC It depends on the client what the unformatted message field contains. Element puts in the display name of the target and FluffyChat the Matrix ID. We need to try to find all Matrix ID refs and replace them with the IRC nick that was intended by the user.

From IRC to Matrix we need to at least map IRC->IRC mentions automatically for readability and IRC->Matrix made configurable.

Filtering events coming from yourself, like messages typed in another znc session

When using znc to act as the intermediary to the actual IRC network, if you type something from one of the other connected actual IRC clients to znc, the message shows back in heisenbridge/matrix fine but shows up as coming from username![email protected] instead of "me" or a virtual user shortname

On other clients it ends up filling in as having come from "me"

This is really just a cosmetic fix, as the message does come back and it's obvious in matrix that something was written on another connection on znc.

Implement message/notice delivery queue for all rooms

Currently only network room has this enabled, it needs to be per-source so if for example you get a flood from a user or a service (like NickServ) it gets nicely bundled up in bigger chunks that are faster to send over-the-wire than individual messages. It will still preserve order so it works great.

Current bundle time is hardcoded to 200ms but it could be configurable by the bridge owner to fine tune bulk performance and reponsiveness.

Make saving room state more robust

I'm not 100% certain this is the case why some room states were lost on the lab instance before but I suspect room and appservice save() needs to do a few things:

  • use an async lock to have only one save in-flight, wait for the lock, saving multiple times isn't too bad but losing data is
  • initiate save (PUT account data) and capture exceptions/errors
  • retry if we get any error, there is no condition where failing to save would be okay
  • load back what we saved
  • compare it with what we have, save again if it's off, log the issue

[Conduit] needs to handle 404 results to /_synapse calls

It does a request to /_synapse/admin/v1/users/@heisenbridge:c.glitch.im/admin here which looks like it should work fine when that call fails.

But in reality, when the call is done against Conduit, it tries anyway for half an hour because of this loop

May 28 00:07:28 niks systemd[1]: Started heisenbridge.service.
May 28 00:07:31 niks python[11225]: DEBUG:asyncio:Using selector: EpollSelector
May 28 00:07:31 niks python[11225]: INFO:root:We are @heisenbridge:c.glitch.im
May 28 00:07:31 niks python[11225]: DEBUG:root:Default config: {'networks': {}, 'owner': None, 'allow': {}}
May 28 00:07:31 niks python[11225]: WARNING:root:Request to HS failed, assuming it is down, retry 1/60...
May 28 00:08:01 niks python[11225]: WARNING:root:Request to HS failed, assuming it is down, retry 2/60...
May 28 00:08:31 niks python[11225]: WARNING:root:Request to HS failed, assuming it is down, retry 3/60...
May 28 00:09:01 niks python[11225]: WARNING:root:Request to HS failed, assuming it is down, retry 4/60...

(I will keep this running for another 28 minutes and see what happens)

Support ident (oidentd forwarding ?)

Currently Heisenbridge (or the lab) doesn't seem to be running an identd so networks that care about it prefix an ~ in front of the username.

I think it should support getting/sending responses through oidentd forwarding for a couple of reasons:

  • Oidentd is a well known service that is easy to setup and runs on the ident port 113 without the need or figuring out how to give Heisenbridge access to a privileged port.
  • Traditional IRC networks generally care about ident and require it to exist and be unchanging before granting out connection limit increases or I-lines or whatever you wish to call them as.

I have no idea how ident works other than using TCP port 113 and particularly IRCnet letting you faster in if you either have it or block it by rejecting traffic to it in firewall, but maybe some of these links could be of help:

Make user ID prefix configurable

Some people may want different prefixes than @irc_, so it shouldn't be hardcoded. Parsing the regex from the registration file (e.g. user id prefix = text before .+ or .* in regex) is probably the best solution if you don't want to add any other config.

[Conduit] Need to register sender_localpart

When using conduit, the bridge needs to register itself, if it doesn't the /whoami will fail with M_FORBIDDEN

I worked around this by manually registering like this:

curl -v -H 'Authorization: Bearer (the as_token)' 'http://[::1]:6167/_matrix/client/r0/register' -d '{"type": "m.login.application_service", "username": "heisenbridge"}'

But the bridge should do this before the whoami call.

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.