aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
Commit message (Collapse)AuthorAgeLines
...
* jabber: Self message handling (echo removal) in MUCsdequis2015-10-30-11/+16
| | | | | | | | | | | | | | | | | | | | | XMPP MUCs always echo own messages, and send messages from other clients. So, we must display everything except the messages we just sent. This implementation uses the jabber stanza cache to add an ID to the message and attach it to a callback which always returns XT_ABORT. This way, if we do get the echo, the message packet handler can call jabber_cache_handle_packet(), and if it returns XT_ABORT, it can skip that particular message. Every other message that looks like it comes from our own JID and wasn't handled by the cache will be displayed, with the OPT_SELFMESSAGE flag Stanza cache entries expire after some time, so it's not a problem if the server doesn't echo messages for some reason. I actually wrote this forever ago, for hipchat, but it works the same way for standard XMPP MUCs.
* IRC self-message support (messages sent by yourself from other clients)dequis2015-10-30-11/+11
| | | | | | | | | | | | | | | | | | | | | | This adds an OPT_SELFMESSAGE flag that can be passed to imcb_buddy_msg() or imcb_chat_msg() to indicate that the protocol knows that the message being sent is a self message. This needs to be explicit since the old behavior is to silently drop these messages, which also removed server echoes. This commit doesn't break API/ABI, the flags parameters that were added are all internal (between protocols and UI code) On the irc protocol side, the situation isn't very nice, since some clients put these messages in the wrong window. Irssi, hexchat and mirc get this wrong. Irssi 0.8.18 has a fix for it, and the others have scripts to patch it. But meanwhile, there's a "self_messages" global setting that lets users disable this, or get them as normal messages / notices with a "->" prefix, which loosely imitates the workaround used by the ZNC "privmsg_prefix" module.
* Use proxy_disconnect() in http, ssl, jabber, oscardequis2015-10-26-2/+2
| | | | | | | | | | Twitter and MSN are all HTTP/SSL, so they don't need it either. The out of tree facebook and steam plugins are also covered by the HTTP/SSL changes. Yahoo is written in a weird way and doesn't seem to need it (it seems it doesn't immediately stop connections when you tell it to logout)
* purple: Fix certificate cache dir after changing user dirdequis2015-10-25-0/+6
| | | | | | | | | | | | | | | | This fixes the issue with getting asked to accept certificates that are perfectly valid, every time. The directory is normally created by x509_tls_peers_init(), a few calls below purple_core_init(), which is at module initialization time, way before we have an irc username to fix the user directory. So it creates the wrong directory first, and now we have to fix it manually. And apparently not being able to save cached certificates somehow means they aren't trusted. For some reason. < krisfremen> "for some reason" < dx> idklol
* socks4a proxy support (like socks4 with remote DNS)dequis2015-10-21-0/+7
| | | | | | | | | Fixes trac ticket 995 https://bugs.bitlbee.org/bitlbee/ticket/995 This is slightly pointless for the suggested use case (tor), since with socks5 we already send a hostname instead of an IP address. Either way, it was easy to implement, so I hope it helps.
* jabber: set BEE_USER_NOOTR flag to _xmlconsoledequis2015-10-21-8/+16
| | | | | | | Fixes trac ticket 1111, https://bugs.bitlbee.org/bitlbee/ticket/1111 One of the most annoying issues. You're trying to debug stuff and it just crashes even harder than without the debug enabled.
* Add a per-user version of OPT_NOOTR, BEE_USER_NOOTRdequis2015-10-21-0/+1
|
* yahoo: call callback on connect error to fix memleakdequis2015-10-21-0/+1
| | | | | | Passing NULL as the "fd" and 0 as the error. The callback is yahoo_connected() in libyahoo2.c, and with those parameters all it does is freeing the data parameter.
* yahoo: Fix handling of proxy connection failuresdequis2015-10-21-1/+9
| | | | | | | | | | | | | | | Fixes trac ticket 135, https://bugs.bitlbee.org/bitlbee/ticket/135 The ticket mentions 100% cpu usage when failing to connect to a socks proxy. It also provides a patch that just checks source == -1 and disconnects cleanly instead of trying to continue logging in. This commit is pretty much the same thing, adapted to the API we're currently using, since the original patch was for bitlbee 1.0.1 and it looks like the old api was terrible back then. That ticket was almost 10 years old. The yahoo code didn't change a lot in that time.
* jabber: Fix XEP85 detection (typing) between two bitlbee usersdequis2015-10-21-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes trac ticket 1143: https://bugs.bitlbee.org/bitlbee/ticket/1143 The "correct" way to discover XEP85 support is to send a discovery query. We take a more conservative approach: if the irc client claims to support typing (by sending CTCP TYPING at least once), we send an <active> tag along with next chat message, and set JBFLAG_PROBED_XEP85. The logic for that stuff is in jabber_buddy_msg(). That's all neat and clever and actually works fine. What was broken was the detection side. Whenever a <composing>, <active> or <pause> is received, the buddy is marked as supporting XEP85. However the <active> tag had an additional check: /* No need to send a "stopped typing" signal when there's a message. */ else if (xt_find_node(node->children, "active") && (body == NULL)) { It skipped the tag completely if it had a message too. This was changed to move the body == NULL condition inside, so that the flag is set. Took me longer to write this message than the diff itself. But even longer to actually decide to debug this behavior. I'm the one who submitted that ticket, one year and a half ago. Yep.
* jabber: Fix outgoing google talk typing notificationsdequis2015-10-21-4/+7
| | | | | | | | | | | Since bare JIDs from typing notifications are now accepted, the other buddy objects never get the flag JBFLAG_DOES_XEP85 set. This fixes it by checking both the buddy with resource and the bare one, with the implication that if the bare JID has that flag, all other resources get typing notifications. Follow up to the previous commit, splitting since they are actually unrelated fixes, although this one is a consequence of the previous one.
* jabber: Fix incoming google talk typing notificationsdequis2015-10-21-1/+5
| | | | | | | | | | | | | | | | | | | | | | | jabber_buddy_by_jid() does the following: head = g_hash_table_lookup(jd->buddies, jid); bud = (head && head->next) ? head->next : head; 'head' has the one without resource, 'bud' has the first resource. So if a resource is available, it uses it and ignores the head. When asked for a bare JID (with no resource) and GET_BUDDY_EXACT, it shouldn't do this, but it should return the head. In other words, the problem was a message in this format: <message from="username@gmail.com" ...> Instead of <message from="username@gmail.com/resource" ...> This only deals with incoming typing notifications. See next commit.
* msn: Don't reconnect on wsse:FailedAuthentication errorsdequis2015-10-14-1/+7
| | | | That includes location blocked and incorrect password.
* msn: Better error messages on 'location blocked'dequis2015-10-14-0/+5
| | | | | | | This is what the 'howtofixmsn' wiki page addressed, which has a very generic name because it's one of the first msn issues that appeared when we thought it was dying. Since it's just a security measure, it still appears when people log in from unusual locations.
* skype: create groupchat as soon as a message is receiveddequis2015-10-13-34/+32
| | | | | | | | | | | | | | | | | | Before this commit, the bee_chat_by_title() call just failed when receiving a message in a groupchat we didn't know about, which is probably something skype broke in their api at some point. I'm fixing this since apparently the only way to access p2p based chats is through the official skype desktop client (they won't be supported through msnp24 or skypeweb. It's broken in mobile clients already), so this plugin is probably the best way to access those. This breaks the 'msg' test - now all chats are groupchats and there's no way to tell them apart. However, in reality, private messages aren't delivered at all over the api, or at least I never managed to get them working. Probably if you talk with someone who has a very old patched skype client.
* skype tests: adjust channel length limit to fix tests...dequis2015-10-13-15/+15
| | | | | | | | | | | | | | The diff might look confusing - it's just removing the last hex digit of each channel name in the groupchat tests. This broke in several ways over the years. I know because i've been bisecting the last few hours and found lots of different issues. All of them except this one were fixed already This one is probably a side effect of the new irc channel name generation code that includes the # as part of the string and reuses the nick code. Or maybe not exactly that, but something similar. I'm not going to bisect any further, had enough for today.
* skype: fix tests to expect NOTICE * instead of NOTICE AUTHdequis2015-10-13-21/+21
| | | | Forgot to change this after b39859e
* skype: use g_vsnprintf() instead of vsnprintf()dequis2015-10-13-2/+1
| | | | | | More prefixes = better. The G stands for "good". (it also fixes the warning about _BSD_SOURCE being deprecated)
* skype: use ssl_sockerr_again() instead of sockerr_again()dequis2015-10-13-1/+1
| | | | | Found the thing using 100% cpu because of a dead connection that it didn't want to bury.
* twitter: Fix some nitpicky issues reported by coveritydequis2015-10-08-21/+24
| | | | | | Mostly minor rare leaks that happen in error conditions, and one dereference before null check in twitter_logout (the null check is probably the wrong one there, but it doesn't hurt to keep it)
* jabber: Fix leak in jabber_gmail_handle_newdequis2015-10-08-2/+2
| | | | | | | From coverity. That g_strdup_printf() was really pointless, slightly ashamed we didn't notice that in the review of the patch.
* jabber: fix null handling with MUC topicsdequis2015-10-08-1/+2
| | | | From coverity.
* jabber: Improvements to the MUC part reason handlingdequis2015-08-26-15/+26
| | | | | | | - Look for a status message right inside <presence> (seen with ejabberd as a result of a s2s connection error) - Check status codes in a while loop, skipping unknown ones (such as 110, which means "Inform user that presence refers to itself")
* jabber/io: Split input buffer parsing to a jabber_feed_input() functiondequis2015-08-26-51/+71
| | | | | | | | | | | To simplify testing. Also allow passing a -1 as size to use strlen() Minor behavior change: The jabber_init_iq_auth() branch can no longer return immediately, which means it will continue through the ssl_pending() check in jabber_read_callback(). Other than that, the size -1 change, and one indentation level less, the function body is the same as before.
* jabber_logout: avoid null jd->buddies warnings in jabber_buddy_remove_alldequis2015-08-08-1/+3
|
* jabber: Show MUC kick/ban/leave reasonsdequis2015-08-08-2/+34
|
* Pass 'reason' values around in imcb_chat_remove_buddy/chat_remove_userdequis2015-08-08-2/+2
|
* typofix - https://github.com/vlajos/misspell_fixerVeres Lajos2015-08-07-44/+44
|
* Only try DIGEST-MD5 if there's no SSL/TLS or if PLAIN isn't supporteddequis2015-07-30-1/+5
| | | | | | | Which in practice means "don't bother with DIGEST-MD5 most of the time". It's weak, pointless over TLS, and often breaks with some servers (hi openfire)
* jabber: Add SASL ANONYMOUS support (XEP-0175)dequis2015-07-04-3/+18
| | | | Use "account jabber set anonymous on" to have bitlbee try that method
* jabber/s5bytestream: add G_GNUC_PRINTF to jabber_bs_abortdequis2015-06-28-1/+1
|
* oscar: Fix some more g_source_remove warningsdequis2015-06-13-0/+6
|
* twitter: show full url in the url command, with usernamedequis2015-06-08-5/+41
| | | | | | | By asking the server for the username. Storing the username somewhere would have made sense, but this command isn't going to be used very often, so, whatever.
* twitter: fix leak of the letter "s" in twitter_url_len_diffdequis2015-06-08-2/+6
| | | | | | | | Yeah, just the letter s from "https", and a null byte. Really critical stuff. You'd have to post a million tweets to even notice this at all.
* twitter: add twitter_log_local_user back (oops)dequis2015-05-30-0/+2
| | | | | Accidentally nuked it while resolving merge conflicts of a different branch.
* Move twitter_parse_id() to parse_int64() in misc.cdequis2015-05-30-19/+2
|
* Merge branch 'develop'dequis2015-05-30-69/+310
|\
| * Merge branch 'master' into developdequis2015-05-28-4/+2
| |\
| * | Rename mail notification related settings for consistencydequis2015-05-28-17/+19
| | | | | | | | | | | | | | | - GMail notifications stuff is now just 'mail_notifications' - sed -i s/notify_handle/mail_notifications_handle/
| * | imcb_notify_email: change parameters to take a format stringdequis2015-05-28-29/+28
| | | | | | | | | | | | | | | | | | | | | Saves some messing with g_strdup_printf for the callers, and flags/sent_at weren't used anyway. Also check if the mail_notifications setting is enabled
| * | Simplify display of gmail notificationsdequis2015-05-28-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | - Add gmail_notifications_limit hidden setting, set to 5 by default. - Don't show "snippets" in email notifications. Not very useful and they make the whole thing seem too spammy - Show sender name instead of your own email - Default values for empty subject / sender
| * | Gmail notifications support through new imcb_notify_email() APIArtem Savkov2015-05-28-14/+211
| | |
| * | jabber: Refactor conference message handlingdequis2015-05-28-55/+82
| | | | | | | | | | | | | | | | | | | | | | | | - Improve handling of "unknown 'from'" - Try a bit harder to detect the source of the message, and fall back to messages sent from a fake temporary user. - Fix receiving topic when it was set by someone who left the room. - Add jabber_get_bare_jid() utility function
| * | Lowering xmpp presence priority on away.Artem Savkov2015-05-28-1/+19
| | | | | | | | | | | | | | | When user set's away lower xmpp presence priority by 5 as most clients do, new priority won't go below zero though.
* | | skyped: add _SRCDIR_ to makefile, test build in travisdequis2015-05-29-1/+1
| |/ |/|
* | skyped: fix make install-doc targetdequis2015-05-28-4/+2
|/
* Include prebuilt skyped manpage, remove asciidoc dependencydequis2015-05-17-13/+209
|
* msn: took me way too long to realize i broke the builddequis2015-05-14-2/+0
|
* msn: Implement sending typing notificationsdequis2015-05-13-38/+19
| | | | Also remove some old unused debug stuff
* msn: Remove nudgesdequis2015-05-13-33/+0
|