GithubHelp home page GithubHelp logo

Comments (12)

lethal-click avatar lethal-click commented on July 19, 2024 1

hi, not sure the support status of bitlbee-discord, so just posting here in case this helps anyone. It seems the problem is that the replacement string needs to be escaped properly as well. That is, in c4f3426, the " " should be "\\r\\n". (Seeing how the tab is escaped above was the clue.) That seems to fix things for me and I can use paste_buffer with no problems. Sorry for the spam.

from bitlbee-discord.

sm00th avatar sm00th commented on July 19, 2024

Couldn't test it out myself since both irssi and xchat seem to split messages on \n, but 2d27e5e should fix you problem. Could you please confirm that for me?

from bitlbee-discord.

tecknojock avatar tecknojock commented on July 19, 2024

You have to enable the "paste_buffer" option and then Bitlbee will concatenate all messages received within 200 ms of the first.
But sure, I'll test

from bitlbee-discord.

tecknojock avatar tecknojock commented on July 19, 2024

Well the messages send properly and no longer error out...but after seeing the output, it might be better if the /n is converted to a space. It runs the lines together.

Thanks again.

from bitlbee-discord.

sm00th avatar sm00th commented on July 19, 2024

Makes sense, c4f3426 does that.

from bitlbee-discord.

tecknojock avatar tecknojock commented on July 19, 2024

Thanks~ Great fix. I think this can be closed.

from bitlbee-discord.

tecknojock avatar tecknojock commented on July 19, 2024

It seems perhaps that discord allows new lines now, so perhaps this concatting is no longer needed?

from bitlbee-discord.

tecknojock avatar tecknojock commented on July 19, 2024

Hmm I've tried messing with this, and despite discord allowing mutliline, neither removing this stripping of /r/n, nor making it only strip /r seems to still result in a failure to send a message.

from bitlbee-discord.

sm00th avatar sm00th commented on July 19, 2024

Hey there, @lethal-click. The support status is "maintenance only" but I'd be glad to merge this if you can create a pull-request with your changes and we can ask someone (like @tecknojock) to test it out.

from bitlbee-discord.

lethal-click avatar lethal-click commented on July 19, 2024

hey, sorry, but I don't have Git or anything like that installed. I literally just hacked the change in and recompiled locally. I only posted in the hope that anyone else with the same problem would find this handy (much gratitude to you @sm00th for making bitlbee-discord in the first place).

the diff is literally just the following on the tip of master:

363c363,364
<   nmsg = g_regex_replace_literal(escregex, emsg, -1, 0, " ", 0, NULL);
---
>   nmsg = g_regex_replace_literal(escregex, emsg, -1, 0, "\\r\\n", 0, NULL);

in case someone else is able to submit the pull request.

from bitlbee-discord.

Alcaro avatar Alcaro commented on July 19, 2024

For small things like this, the web interface is easier.

Either way, submitted per your request. #196

from bitlbee-discord.

lethal-click avatar lethal-click commented on July 19, 2024

thanks @Alcaro, looks good. Hope someone is able to get some use out of this.

from bitlbee-discord.

Related Issues (20)

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.