aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
Commit message (Collapse)AuthorAgeLines
* Remove cb stuff and some cleanupscramMarius Halden2016-07-06-83/+23
|
* Use saslprep, more cb stuffMarius Halden2016-07-06-23/+87
|
* purple: added room listing supportjgeboski2016-06-29-0/+131
|
* Added an interface for the listing of existing chatroomsjgeboski2016-06-29-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several protocols can provide a list of existing chatrooms that a user is able join. This is crucial for the usage of several protocols, most notably Purple and Facebook. Plugins wishing to support this extended functionality must implement the new prpl->chat_list() function. This implemented function will in most cases send a remote request for the list of chatrooms. Once the list of chatrooms is obtained, a bee_chat_info_t GSList must be created and assigned to the im_connection->chatlist field. Then a call to the bee_chat_list_finish() is needed to display the list to the user. The chat list is maintained entirely by the plugin, so it is important to ensure all pointers related to the chat list remain valid until the chat list is set to NULL. This list is used internally by bitlbee to calculate indexes, which then allows the user to join a chat with an index, rather than some random identifier. It also important to ensure the list is properly freed whenever it is updated, or when the account is disconnect via the prpl->logout() function. On the user interface side of things, the 'chat list' subcommand was recommissioned. For a user to list the existing chat rooms: chat list <account id> Afterwards a user can join a chatroom in the list with its index. This extends the functionality of the 'chat add' subcommand by adding in support for the exclamation point operator to denote an index. chat add <account id> !<index> [channel]
* Follow c89/90Marius Halden2016-06-26-2/+2
|
* Add support for SCRAM-SHA-256Marius Halden2016-06-26-4/+20
| | | | With this aproach it will be simple to add any hash to the scram implementation with some simple boilerplate.
* Disable SCRAM if username/password contains non-ascii characters as saslprep ↵Marius Halden2016-06-26-0/+19
| | | | is not yet used
* Add initial support for SCRAM-SHA-1Marius Halden2016-06-26-13/+231
|
* Use correct error when no schemes are supported (#78)Marius Halden2016-06-11-1/+1
| | | | | | | | This will make bitlbee tell the user about the requirement for oauth when the server actually announces support for oauth. If the server does not announce oauth support bitlbee will tell the user it doesn't support any of the schemes provided by the server. These messages were reversed before.
* Twitter: add "like" as an alias for favourite.Aaron van Geffen2016-05-26-1/+2
| | | | | This will allow a user to type "like" in Twitter channels, reflecting recent changes to Twitter itself. Note that the API hasn't changed.
* Only load plugins with the right file extensionjgeboski2016-05-25-0/+4
| | | | | | Plugins which use autotools will install a .la file along with the .so file. Both of these files are loadable as plugins, so the plugin ends up being loaded twice. To prevent this, only load the .so module.
* Show the enabled/disabled protocols in the 'plugins' command outputjgeboski2016-05-25-0/+12
|
* Implemented plugin information for external pluginsjgeboski2016-05-25-1/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of now, bitlbee will load any plugin regardless of the ABI it was built against. This is really problematic when structures or symbols are changed within bitlbee. This often leads to the plugin not loading or the plugin acting in an undefined way. Typically a simple rebuild of the plugin will resolve such issues, but many users have no idea that this is required after they have updated bitlbee. Furthermore, it is often times impossible to determine the version of a plugin, without relying on the package manager of the system. This is quite a problem when users are reporting bugs for external plugins, and they have no idea what version of the plugin they are running. This is also an opportunity to provide additional metadata for each plugin that can then be displayed to the user. Solving these issues is done by adding a new required function to each plugin. The init_plugin_info() function must now be implemented along with the init_plugin() function. This function then returns a static structure, which retains all of the metadata for the plugin. Then this is used by bitlbee to check the ABI version and provide information to the user. The introduction of the new function is required as bitlbee needs to obtain the ABI version before calling init_plugin(). The boiler-plate implementation of init_plugin_info(): #ifdef BITLBEE_ABI_VERSION_CODE struct plugin_info *init_plugin_info(void) { static struct plugin_info info = { BITLBEE_ABI_VERSION_CODE, /* Required */ "plugin-name", /* Required */ "1.3.3.7", /* Required */ "A short description of the plugin", /* Optional */ "First Last <alias@domain.tld>", /* Optional */ "http://www.domain.tld" /* Optional */ }; return &info; } #endif The example wraps the function declaration in an if block for backwards compatibility with older bitlbee versions. Displaying the plugin metadata is done via the newly added "plugins" command, which simply dumps formatted data to the root channel.
* purple: strdup the message instead of casting to char *dequis2016-05-25-3/+6
| | | | | | Fixes trac ticket 1255, which points out that a strip_html() call down there may modify the passed string, and some purple plugins may pass read-only string data to it.
* Remove the ARCH / CPU defines.Jelmer Vernooij2016-05-15-2/+1
| | | | | | | These only reflect on what arch/cpu bitlbee was built, not on which it is running. This makes the Debian package unreproducible. See e.g. https://tests.reproducible-builds.org/rb-pkg/testing/i386/bitlbee.html
* load_plugin: Improve g_module_open error messagedequis2016-05-06-1/+1
| | | | | The previous one seemed to imply a "file not found" error, which is misleading.
* twitter: Fix a couple of leaks of mutes_ids and retweets_idsdequis2016-04-17-8/+10
| | | | | | | Just freeing the list on logout and when removing items from them. Also remove the "checking mutes" debug which is disproportionately noisy compared to the rest of the protocol.
* Merge remote-tracking branch 'bitlbee/pr/70'dequis2016-04-16-4/+204
|\
| * Avoid adding an id twice to the mutes list.Flexo2016-04-01-7/+26
| | | | | | | | | | | | | | Twitter doesn't error if you mute the same user multiple times. Also, correct signedness of the stringified user ids. bitlbee keeps them as unsigned even if the json library uses signed for integers...
| * Receive mute/unmute notifications from the stream.Flexo2016-03-31-5/+25
| |
| * Add mute and unmute commands.Flexo2016-03-31-0/+24
| |
| * Honour twitter's mutes and "hide retweets from this user" settings.Flexo2016-03-23-0/+137
| |
* | Support for locked-down accountsDennis Kaarsemaker2016-03-23-2/+4
|/ | | | | | | | | | | | | In certain situations, e.g. when working with pregenerated configurations, it is useful to be able lock down accounts so they cannot be deleted and authentication information (user, password, server) cannot be changed. We mark such sensitive settings with ACC_SET_LOCKABLE and will refuse to change them if the account is locked by setting the ACC_FLAG_LOCKED flag. This flag is stored in the xml files as account attribute locked="true".
* jabber: Add "always_use_nicks" setting, for non-anonymous MUCsdequis2016-03-20-4/+21
| | | | | | | | | Basically the same thing as github PR #55, which fixes trac bug 415, but this one conditionalized that behavior and uses the API introduced a few commits ago. I didn't think too much about the setting name and i'm open to changing it to anything else
* jabber: Fix leak in jabber_si_set_proxiesdequis2016-03-20-0/+2
|
* jabber: Properly handle rejected file transfersdequis2016-03-20-20/+32
|
* jabber: Check for other resources before removing someone from a chatdequis2016-03-20-1/+14
| | | | | | So if someone has several connections with several clients to a chat, they won't appear as leaving from the chat until they leave from the last client.
* Add imcb_buddy_nick_change(), like nick_hint but strongerdequis2016-03-20-4/+18
| | | | | | | nick_hint only works when creating new users, it's a no-op after the user is online. This new function takes care of nick changes after that. It also helps clean up couple of hacks in irc_im.c \o/
* jabber: return XT_ABORT after failed IQ auth attemptsdequis2016-03-12-2/+2
|
* twitter.c: Squelch an unused variable warningDennis Kaarsemaker2016-02-26-1/+1
| | | | 9456255 made the variable 's' unused but failed to remove it.
* Change twitter url length to 23 instead of 22Vegard Langås2016-02-09-6/+1
|
* jabber: Mark messages from other resources as OPT_SELFMESSAGE toodequis2016-01-24-1/+3
| | | | | | | The jabber_buddy used for messages sent from other resources connected to the same groupchat has a different ext_jid and it's a different object than jc->me, so doing a string comparison against acc->user is needed.
* purple: Also show 'title' and 'primary' messages for input requestsdequis2016-01-21-1/+12
| | | | It was showing 'secondary' only before.
* Revert "hipchat: Implement their own variant of self-messages [...]"dequis2016-01-21-19/+1
| | | | | | | This reverts commit d11ccbf6ea94264bde8b0f525c4bbedf50de0174. After thinking about this long enough I've decided this is a bad idea, and better wait for the hipchat server to support carbons.
* msn: Fix ADL/RML (add/remove from list) throwing server errorsdequis2015-12-30-1/+3
|
* msn: Don't truncate passwords to 16 chars anymore.dequis2015-12-30-5/+1
| | | | This was needed back in 2010, but now it's not.
* purple: Show self-messages for private messages onlydequis2015-12-27-24/+25
| | | | | | | | | | Those are purple_conversation_write with PURPLE_MESSAGE_SEND flag set, received through the write_conv UI op. write_chat and write_im still receive and filter PURPLE_MESSAGE_SEND. In the case of write_chat it *could* show some of those, but it seems there's no decent way to tell echoes apart from remote self-messages. So just keep those hidden for now.
* purple: document original names of uiops next to themdequis2015-12-26-64/+64
|
* oscar: Add prefixes to all functions that may conflict with purpledequis2015-12-18-0/+98
| | | | | | | | When people build with ./configure --purple=1 --oscar=1, the native oscar is compiled statically, which should take priority, but sometimes purple's oscar is used instead and bad things happen, most of it being due to calling bitlbee's native aim_callhandler instead of the function with the same name of libpurple's liboscar.so.
* hipchat: Implement their own variant of self-messages (not working yet)dequis2015-12-16-1/+19
| | | | | | | | | | | | Reuses part of the carbons code, but it's not like it at all. To be able to receive these messages at all, a different cap node whitelisted by them is required. I could have used one of the official clients, but let's try to get things done the right way. This will start working once they make that change in their servers, right now this is still in their ticket backlog. I'm merging this now because it's harmless and nice to have as part of the upcoming release.
* jabber: Add message processing hints to OTR messages (XEP-0334/0364)dequis2015-12-15-0/+22
| | | | | This prevents them from being stored or copied to other clients when carbons are enabled.
* Remove nonexistent forward declarationesainane2015-12-11-1/+0
| | | | | | imcb_find_buddy is mentioned only in nogaim.h, and is never defined anywhere. This is misleading for plugin authors, who were probably looking for (the actually implemented) imcb_buddy_by_handle instead.
* Revert "imc_away_send_update: Fix leak of away_states linked list"dequis2015-12-09-6/+1
| | | | | | | | | This reverts commit ed431c389887080dc4fa45e30d051ce733f4ce57. I'm going to let this leak. Turns out only purple allocates an empty list for every time this is called. Other protocols have statics, and they always return the same thing, can't free those. Whatever. The purple leak was insignificant, just more scratching of itches.
* purple: fix crash when doing 'chat with' with skypewebdequis2015-12-06-1/+1
| | | | | | | | | | | It was passing the wrong data to the callback - it was supposed to pass the data of the PurpleMenuItem but it passed the PurpleMenuItem itself. Probably also applies to other protocols too. It worked fine with jabber, which i'm guessing is what this code was tested with originally. It still whines about the null return value saying "(Possible) failure" but, eh, whatever.
* imc_away_send_update: Fix leak of away_states linked listdequis2015-12-05-1/+6
|
* If imc_away_state_find() fails, try again finding "away"dequis2015-12-05-1/+2
| | | | | | | | | | | | | | | | | | | Fixes trac ticket 1175, https://bugs.bitlbee.org/bitlbee/ticket/1175 "Setting away with libpurple fails silently except for a few values" Turns out the fallback was the first item of the list, which for libpurple's jabber is "Feeling" (what?) and seems to be a no-op in practice. With this commit the fallbacks are in this order: 1. Try to find whatever the user wrote in the away setting. 2. If that fails, find "away" in the away states. 3. If that fails, use the first away state. This might not fix it in some rare cases where the prpl doesn't have an away state equivalent to away. But hopefully the old fallback works for those, jabber was the weird one here.
* Remove facebook XMPP code, show error pointing at the new plugindequis2015-12-04-47/+12
| | | | | | | | | | | | | | Facebook's oauth has been broken for months, and in the last few days they broke plain logins too, so I just added an error message that says this when you do "account on": Facebook's XMPP service is gone. Try this instead: https://wiki.bitlbee.org/HowtoFacebookMQTT Also nuked all the oauth related code, except some parts of lib/oauth2.c which seemed generic enough to maybe help in the future with other not-really-compliant not-really-implementations of the not-really-oauth2 not-really-spec
* purple: assume HTML for all protocols, fixes random &lt;&gt; for somedequis2015-12-01-3/+1
| | | | | | | | Purple's IRC, for example, doesn't have the PURPLE_CONNECTION_HTML flag, but still sends html for format codes. Note that using IRC through libpurple through bitlbee is still a terrible idea. Use ZNC instead.
* purple: Implement PurpleNotifyUiOps.notify_messagedequis2015-12-01-1/+22
| | | | | | | | | | | | | | | | | | Which has no connection context. Luckily local_bee exists, and libpurple only supports only one irc user per process. This sucks. And yesterday I was naively thinking (again) that local_bee might not be needed, that maybe we can do things properly. Of course it only took a look at that one reverted commit (56985aa) to remember that life is unfair, and that, under Moloch, everyone is irresistably incentivized to ignore the things that unite us in favor of forever picking at the things that divide us in exactly the way that is most likely to make them more divisive. That being said, I think all these hacks are going to look nicer once I sandbox the whole thing in a separate process with one IM account per process, as opposed to one irc use per process. Then we'll be able to rely on global state exclusively, which is saner.
* Add 'log' UI function, to avoid direct calls to irc_rootmsg from nogaimdequis2015-12-01-3/+8
| | | | | Just a trivial wrapper over irc_rootmsg(), but will help me to slightly reduce the ugliness of an unavoidably ugly hack for libpurple.