Permalink
Commits on Jul 31, 2018
  1. twitter: show quote tweets when the url isn't in the entities

    dequis committed Jul 31, 2018
    Which means we recognized that a tweet had a quote in it, but not
    finding a matching URL entity meant we didn't have anywhere to show it.
    Now it's appended at the end.
    
    This is what changed here: https://twittercommunity.com/t/105473
    ("Updating how URLs are rendered in the Quote Tweet payload")
    
    Took me way too long to realize it was this and why it happened - if you
    create quote tweets by copypasting urls, the behavior doesn't change,
    this only applies if you use the retweet button in twitter web and add a
    comment.
    
    And initially we disregarded it as some brownout of the userstream, but
    it looks like it applies to the REST api too.
  2. Use GString for irc->sendbuffer (simpler and faster)

    dequis committed Jul 12, 2018
    The old code managed growing the buffer manually and called strlen()
    very often. GString has a length field and the logic to grow the buffer
    is none of our business. Probably smarter, too.
    
    This takes a "blist all" of 14k users from 8.2 to 1.3 seconds.
Commits on Jul 12, 2018
  1. Stop using the irc->users linked list, use the hash table instead

    dequis committed Jul 3, 2018
    irc_user_new() mentions that the reason this list is kept is for easy
    iteration. Luckily, this is the future, and GHashTableIter exists now.
    
    The main point of this is to get rid of the g_slist_insert_sorted() in
    irc_user_set_nick() which is a particularly slow part of loading large
    user lists, and scales poorly
    
    In a test with discord, the GUILD_SYNC event is now 4 times faster, on
    top of the improvements of the other bee_user hash tables patch.
    Combining both patches it went from 136 to 6 seconds for 50k members.
  2. irc_vawrite: cut amount of strlen(irc->sendbuffer) calls in half

    dequis committed Jul 12, 2018
    Building large send buffers are still slow and really could use some
    GString, but this is an easy improvement.
Commits on Jul 9, 2018
  1. rename -del help clarification

    arcnmx authored and dequis committed Jul 9, 2018
Commits on Jul 5, 2018
  1. purple: Add "bitlbee-set-account-password" signal

    dequis committed Jul 5, 2018
    Replacement API for purple_account_set_password() to be called by prpls
    that wish to store updated passwords or oauth tokens, since our password
    storage doesn't get notified of calls to purple_account_set_password().
    
    Added so that the hangouts plugin can stop using that awful hack for the
    oauth refresh token
Commits on Jul 3, 2018
  1. Add a hash table to speed up bee_user_by_handle()

    dequis committed Jul 3, 2018
    This maintains a hash table next to the linked list, which results in
    negligible additional memory usage (~300kb for 10k users) but allows
    instant lookups.
    
    This was a big problem with discord, which has huge user lists and joins
    everyone to every channel. In my test, the GUILD_SYNC event for 10k-50k
    user lists is now approximately 5 times faster.
    
    This hash table based code is only used if handle_cmp is either
    exact or case-insensitive string comparison (g_ascii_strcasecmp or
    strcmp/g_strcmp0).
    
    The old function that goes through the bee->users linked list is now
    called bee_user_by_handle_slow() and used for protocols with unusual
    handle_cmp functions - skimming through the code, just oscar.
    May revisit this if it happens to more meaningful protocols.
    
    The case-insensitive hashtable functions are copied from irssi, which is
    also GPLv2. I renamed them from g_ to b_ (g_istr_equal to b_istr_equal)
Commits on May 27, 2018
  1. Remove deprecated placeholder for 'nick' command (added 2010)

    dequis committed May 27, 2018
    BitlBee 1.x compatibility stuff. It's just confusing now.
  2. Merge branch 'develop'

    dequis committed May 27, 2018
Commits on May 25, 2018
  1. Openssl 1.1 support

    cotequeiroz committed May 25, 2018
    This adds openssl 1.1.0 support.
    
    Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
Commits on May 8, 2018
  1. Fix bitlbee.org URLs.

    Wilm0r committed May 8, 2018
Commits on Apr 11, 2018
  1. debian: turn -common and -dev into arch:any to safely use --link-doc

    dequis committed Apr 11, 2018
    This started with trying to remove something that says "remove the hack
    below once Hardy and Lenny are deprecated". Hardy and Lenny have been
    deprecated for years, this should be easy, right?
    
    Turns out that the symlink stuff we were doing can result in broken
    packages with binNMU, see debbug#767839. This is also documented in the
    dh_installdocs man page:
    
    > CAVEAT 2: The use of --link-doc should only be done when the packages
    > have same "architecture" type. A link from a architecture independent
    > package to a architecture dependent package (or vice versa) will not
    > work. Since compat 10, debhelper will actively reject unsupported
    > combinations.
    
    And we were doing essentially the same wrong thing but manually.
    
    The easiest way to solve this is to stop mixing arch:any and arch:all,
    and to make everything arch:any. Let's hope this is as easy as it looks.
    
    Thanks to bunk, nthykier and olly from #debian-devel for help with this.
  2. debian: add ${DEB_HOST_MULTIARCH} to pkgconfig install path

    dequis committed Apr 11, 2018
    Fixes lintian pkg-config-unavailable-for-cross-compilation
  3. debian: Fix postinst error with no /var/lib/bitlbee

    spwhitton authored and dequis committed Apr 11, 2018
    (Patch from debbug#816200, changelog modified slightly by dx)
Commits on Mar 31, 2018
  1. jabber: try to join anyway after "Already present in chat"

    dequis committed Mar 31, 2018
    Most of the time that error meant a confusion on bitlbee's side, often a
    server for which we sent a join request and never got a reply for.
  2. oscar: remove old_icq_auth (XOR login, default off since 2010)

    dequis committed Mar 31, 2018
    Holy crap this login method is *bad*
Commits on Mar 28, 2018
  1. debian: pass --systemdsystemunitdir to ./configure explicitly

    dequis committed Mar 28, 2018
    It normally comes from a pkg-config in the systemd package, but for some
    reason the debian stretch image in wilmer's pbuilder doesn't have it,
    even though it's installed in both newer and older debians. Who knows.
    Easiest to just not depend on it here.
Commits on Mar 27, 2018
  1. debian: limit dh_systemd actions to the bitlbee-common package

    dequis committed Mar 27, 2018
    Fixes issues such as the following in debian testing/sid
    
    >dh_systemd_enable: Requested unit "bitlbee.socket" but it was not found
    in any package acted on.
  2. debian: bump compat level from 6 to 9

    dequis committed Mar 27, 2018
    It's nicer like this, and some builds were defaulting to it anyway. See:
    
    https://manpages.debian.org/unstable/debhelper/debhelper.7.en.html#Supported_compatibility_levels
Commits on Mar 26, 2018
  1. Write backtrace to /var/lib/bitlbee/crash.log on SIGSEGV

    dequis committed Mar 26, 2018
    Async-signal-safe code is very restricted (nothing that may call malloc
    indirectly), so this code tries its best to show meaningful stuff, but
    the output is still fairly raw. The contents of the log file are:
    
    - BITLBEE_VERSION, BITLBEE_CONFIGURE_ARGS
    - Backtrace as generated by backtrace()/backtrace_symbols_fd()
    - A small help text explaining how to get more useful symbol names
    - Memory maps (/proc/self/maps), which also mentions loaded plugins
    
    The backtrace() function is a GNU extension, /proc/ is a linux thing.
    Non-glibc platforms (such as musl) won't show anything, non-linux
    platforms will skip the memory maps when /proc/self/maps fails to open.
    
    I'd like to include timestamps, but I can't find a safe way to format
    them. Even turning raw unix timestamps to strings is hard. Fun stuff.
    
    I used the config directory because it's the only place we can be sure
    we can write to. The filename is hardcoded for the same reason there are
    no timestamps.
Commits on Mar 21, 2018
Commits on Mar 20, 2018
Commits on Mar 19, 2018
  1. configure: Add -Wformat -Werror=format-security to default CFLAGS

    dequis committed Mar 19, 2018
    Matches debian build scripts.
    
    Also expands the condition to gcc or clang. I'd rather remove this,
    apparently it exists because some opensolaris compiler didn't have -Wall
    which seems absurd to me, but whatever.
  2. root_commands: Fix -Wformat-security errors

    dequis committed Mar 19, 2018
    Showed up in debian builds
  3. irc_commands: send numeric 900 RPL_SASLSUCCESS too, some clients need it

    dequis committed Mar 19, 2018
    The nodejs irc-framework lib used by thelounge and kiwiirc seems to
    expect 900 on successful login, instead of just 903, so they hang on
    sasl auth from bitlbee.
    
    The sasl spec isn't very specific on which should be used (IMO clients
    should handle both), but it seems to point at the direction of sending
    both, so both it is.
  4. purple: support PURPLE_MESSAGE_REMOTE_SEND for groupchat self-messages

    dequis committed Mar 19, 2018
    Requires libpurple 2.12.0
    
    Mostly relevant recently with slack-libpurple.
Commits on Mar 12, 2018
Commits on Mar 11, 2018
  1. Remove old skype plugin. Use the skypeweb purple plugin instead.

    dequis committed Mar 11, 2018
    RIP
    
    This plugin relied on the skype linux client, which doesn't work
    anymore. During login it just does exit(0) for mysterious reasons.
    I guess that's the server trying to say that it's not supported.
    
    This is officially dead now after a few years of kinda-almost-working.
  2. Try to join long spaceless lines in paste_buffer without a newline

    dequis committed Mar 11, 2018
    Fixes trac ticket 1302
    
    The main use case for this is pasting long URLs and not breaking them