aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/nogaim.c
Commit message (Collapse)AuthorAgeLines
* Merge branch 'master' into patched-masterMarius Halden2017-05-14-3/+3
|\
| * Fix status message being set to null accidentallydequis2017-05-07-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In other words, "account jabber set away Message" resulted in away status being set, but not "Message". Fixes trac ticket 1291 This was broken by ac68733ad7a5127395d6367b655a2d9de5d911b5 (3.4.2) That commit added another call of imc_away_state_find() with the fixed string "away", so purple protocols can become away by setting away to any string. But by doing so, it wiped the status message because it's the same as the name of the away state.
* | Merge branch 'master' into patched-masterMarius Halden2016-12-26-36/+54
|\|
| * Refactor: Split plugin info stuff from load_plugin() into two functionsdequis2016-12-25-35/+53
| |
| * Fix some compiler warningsdequis2016-11-28-1/+1
| | | | | | | | | | | | | | | | warn_unused_result on write() is particularly annoying. You can't just add (void) to ignore it due to gcc bug 66425. I replaced some of those with fwrite() and used a variable marked with the G_GNUC_UNUSED attribute for the writes from signal handlers.
* | Merge branch 'master' into patched-masterMarius Halden2016-11-21-12/+0
|\|
| * Manual merge with wilmer's approach to handling missing protocolsdequis2016-11-21-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out he already implemented pretty much the same thing in the parson branch... last year. The differences between the two approaches are subtle (there aren't too many ways to do this, some lines are the exact same thing) but I decided I like his version better, so this mostly reverts a handful of my changes while keeping others. The main advantage of his approach is that no fake protocols are registered, no actual prpl functions are called, and the missing prpl is a singleton constant. New things compared to the implementation in the other branch: - The explain_unknown_protocol() function. - Fixed named chatrooms throwing a warning and losing the "account" setting when saving. See changes in irc_im.c - Fixed the "server" setting dropping when saving. See account.c Differences with my previous implementation: - Accounts with missing protocols don't autoconnect - 'account list' marks them as "(missing!)"
* | Merge branch 'master' into patched-masterMarius Halden2016-11-19-5/+50
|\|
| * Remove yahoo (the old protocol). Use funyahoo++ instead.dequis2016-11-19-5/+0
| | | | | | | | | | | | RIP The previous commit already handled the part of telling users.
| * Improve handling of unknown protocols / missing pluginsdequis2016-11-19-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of failing to load the config, a fake prpl is created to load the account, keep its settings, and refuse to log in with a helpful error message. Also added a new explain_unknown_protocol() function which returns text which attempts to explain why a protocol is missing, handling several typical cases, including the future removal of several dead libpurple plugins. That message is shown when logging in to a loaded account with a missing protocol and when adding a new one with 'account add', with the difference that the latter doesn't leave a placeholder fake account.
* | Merge branch 'master' into patched-masterMarius Halden2016-09-29-0/+3
|\|
| * Fix crash when setting away in protocols with null away_states listdequis2016-09-28-0/+3
| | | | | | | | | | | | | | Like funyahoo++, which has online and offline statuses, but bitlbee's purple filters those out, resulting in an empty list, and boom. It's ugly enough that I think I'll add a workaround to the plugin too.
* | Add setting to only use tags in imcb_log and otherMarius Halden2016-07-27-10/+14
|/
* 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/+10
|
* Implemented plugin information for external pluginsjgeboski2016-05-25-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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.
* Add imcb_buddy_nick_change(), like nick_hint but strongerdequis2016-03-20-4/+16
| | | | | | | 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/
* 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.
* 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.
* Add 'log' UI function, to avoid direct calls to irc_rootmsg from nogaimdequis2015-12-01-3/+6
| | | | | Just a trivial wrapper over irc_rootmsg(), but will help me to slightly reduce the ugliness of an unavoidably ugly hack for libpurple.
* Show a nicer message when a protocol is disabled in account adddequis2015-11-23-11/+14
| | | | | | | | | | | | This adds the disabled protocols' prpl structs to a different linked list, only used for this lookup. They were previously marked as leaking by valgrind, so, whatever. I can't free them, since some protocols memdup() it after attempting to register. I think disabling the protocols from bitlbee.conf is just stupid and provides no real benefits, but someone will complain if i get rid of it. So this just improves the error message to make it less confusing when someone accidentally uncomments that crap.
* Nuke imcb_clean_handle(), which was merging handles accidentallydequis2015-11-09-26/+2
| | | | | | | | | | | | | | | | Well, just deprecated and turned into a no-op. It was only used for jabber anonymous MUCs, but this is something the IRC layer must take care of. It stripped all whitespace, control and non-ascii characters, breaking utf8 nicks support and accidentally merging contacts whose cleaned-up handles were the same string. For example, you could have two users with nicks ' ' and ' ' (one and two spaces respectively) and imcb_clean_handle() would just merge them into a single handle, '', which makes them look like a single irc user. The same thing happens with nicks that are entirely made of utf8. Thanks to schoppenhauer from #bitlbee for reporting this and preparing a test case channel!
* Fix a bunch of memory leaksdequis2015-03-22-14/+19
| | | | | | | | | | | | | | | | | | | - irc_im.c: - bee_irc_user_msg: strdup leaks when otr swallows messages - bee_irc_user_action_response: GString leak in all ctcp replies - otr.c: - call g_slist_free() on the list of the otr_policy setting - otr_filter_msg_in: call otrl_tlv_free() if "tlvs" are returned - otr_filter_msg_out: don't g_strdup() if the message should be ignored - log_otr_message: g_strdup_vprintf() leaks always - nogaim.c: - imcb_ask_auth/imcb_ask_add: leaks in g_strdup_printf() - imcb_ask_add leaks imcb_ask_cb_data if the user already exists - add imcb_ask_cb_free() to correctly free its data - msn_util.c: add msn_buddy_ask_free(), ditto - storage_xml.c: pass_cr/password if base64_decode or arc_decode fail - ssl_gnutls.c: conn->hostname leak in error conditions, like invalid certs - jabber_util.c: jabber_buddy_by_ext_jid() leaks jid if it's not an ext jid
* Reindent everything to K&R style with tabsIndent2015-02-20-357/+368
| | | | | | | Used uncrustify, with the configuration file in ./doc/uncrustify.cfg Commit author set to "Indent <please@skip.me>" so that it's easier to skip while doing git blame.
* Fix whatsapp local contact listsdequis2015-01-25-0/+11
| | | | | | | | | Had to move the code that adds contacts to imcb_connected to avoid dereferencing a null im_connection. Turns out this kind of local contact lists only applies to renamed contacts, though. It doesn't deal with libpurple's blist.xml at all (it could, there are APIs for it since 2.6.0)
* Fix incorrect Free Software Foundation addressMatej Cepl2015-01-16-2/+2
|
* I'm still bored on a long flight. Wrote a script to automatically updateWilmer van der Gaast2013-02-21-1/+1
| | | | | | | my copyright mentions since some were getting pretty stale. Left files not touched since before 2012 alone so that this change doesn't touch almost EVERY source file.
* Bugfix: Two commits ago I broke cleanup of the account_on_timeout() handler,Wilmer van der Gaast2012-11-12-2/+1
| | | | | taking down every IM connection 2m after setup.
* Extend keepalive code to time out connections when pings don't getWilmer van der Gaast2012-11-11-2/+22
| | | | | acknowledged, using this for Twitter streams and MSN so far.
* Add a helpful message on what to do with OAuth login issues.Wilmer van der Gaast2011-12-21-4/+15
|
* As I intended for a while already, use account tags everywhere instead ofWilmer van der Gaast2011-12-13-1/+1
| | | | | | | | "protocol(handle)". It's guaranteed to be unique and also shorter. It may suck for people who have multiple accounts and didn't change their tags, but that'll hopefully remind them to change them.
* rename irc_usermsg to irc_rootmsg.unknown2011-10-03-2/+2
| | | | | | add new irc_usermsg, irc_usernotice. deliver user-specific messages from libotr as notices to that user.
* Time out if logging in takes too long (2m for now). Except for TwitterWilmer van der Gaast2010-11-21-0/+1
| | | | | | OAuth login, which requires user action. This mostly solves problems with OSCAR login silently failing, but may also be useful in other places.
* Handle payloads attached to errors (assume any number in cmd[2] would beWilmer van der Gaast2010-08-29-1/+1
| | | | | | a payload length, which seems like a fair assumption). This should solve problems with logging in with dodgy contact/membership lists.
* Proper responses to CHL challenges. Clean up bee_users before callingWilmer van der Gaast2010-08-12-8/+8
| | | | | | prpl->logout() since the buddy_data functions would like some structs to still exist.
* OpenSolaris (non-gcc) fixes, patches from Dagobert Michelsen <dam@opencsw.org>Wilmer van der Gaast2010-08-07-2/+2
| | | | | with some changes.
* Don't notify the UI about group changes if there wasn't, in fact, a change.Wilmer van der Gaast2010-07-30-1/+3
| | | | | This should stop the odd left+joins that were happening sometimes.
* Source documentation update, including a short HACKING file.Wilmer van der Gaast2010-07-28-11/+0
|
* libpurple: Handle incoming authorization requests.Wilmer van der Gaast2010-07-17-0/+6
|
* When cleaning up queries, q->data is free()d. Even if it turns out to beWilmer van der Gaast2010-07-11-3/+3
| | | | | | | the "struct irc" containing all data belonging to a session. Sanitise memory management a little bit here. (There are some memory leaks in here too that need to be fixed at some point.)
* When addressing people in a chatroom, try to translate the nickname to theWilmer van der Gaast2010-07-05-0/+3
| | | | | original unstripped version (without ugly underscores, also).
* Auto joins for chatrooms.Wilmer van der Gaast2010-07-04-0/+6
|
* Import chatrooms configured in older BitlBee versions. Settings are currentlyWilmer van der Gaast2010-06-27-1/+0
| | | | | | ignored though. Also removing the old chat.[ch] files since they're really not important anymore.
* Restored nick_hint/nick_source functionality.Wilmer van der Gaast2010-06-07-32/+6
|
* Changing away_devoice will change current voice statuses in all channels.Wilmer van der Gaast2010-06-07-59/+0
|
* Merging killerbee stuff, bringing all the bleeding-edge stuff together.Wilmer van der Gaast2010-06-07-2/+10
|\
| * Mainline merge. (Probably mostly irrelevant for this branch, oh well.)Wilmer van der Gaast2010-05-16-17/+75
| |\
| | * Applied show-offline patch from Florian E.J. Fruth, adapted for a fewWilmer van der Gaast2010-05-02-16/+74
| | | | | | | | | | | | | | | changes that happened since 1.2.4.