aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/purple/purple.c
Commit message (Collapse)AuthorAgeLines
* Merge branch 'master' into patched-masterMarius Halden2018-04-19-1/+8
|\
| * purple: support PURPLE_MESSAGE_REMOTE_SEND for groupchat self-messagesdequis2018-03-19-1/+8
| | | | | | | | | | | | Requires libpurple 2.12.0 Mostly relevant recently with slack-libpurple.
* | Merge branch 'master' into patched-masterMarius Halden2017-09-06-1/+3
|\|
| * purple: enable debug during core initializationdequis2017-07-12-1/+3
| | | | | | | | Noisy but often important
* | Merge branch 'master' into patched-masterMarius Halden2017-01-07-3/+7
|\|
| * purple: show self-messages in groupchat backlogs (before join)dequis2017-01-03-3/+7
| | | | | | | | | | | | That is, flagged with PURPLE_MESSAGE_DELAYED. Those are safe to display. This is similar to what adium does. Thanks EionRobb for the idea.
* | Merge branch 'master' into patched-masterMarius Halden2016-12-27-3/+113
|\|
| * purple: fix -Werror=format-string in chat settings codedequis2016-12-26-4/+2
| | | | | | | | | | This one was caught by the debian build scripts in travis. I had format-security in my local cflags, not format-string. Welp.
| * purple: hack to keep the purple-line auth token in the configdequis2016-12-26-1/+20
| |
| * purple: add support for extra groupchat settings (helps with SIPE)dequis2016-12-26-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds channel settings prefixed by purple_. For example jabber now has purple_room and purple_server which are decomposed variants of our own 'room' setting. Okay, that doesn't sound very useful. It also adds some sync from the values returned by chat_info_defaults() - so if the plugin figures something out in there, we save it in our own settings. In the case of SIPE this adds a new setting, purple_uri, which can be set with the ma-chan:// uri for a persistent chat. This solves the issue with the SIPE plugin only knowing how to do name lookups after doing 'chat list' - now it just needs to work once, and we save the real URI in our settings.
| * Change some asserts into g_return_if_fail()dequis2016-12-26-2/+2
| | | | | | | | | | | | Because crashing asserts are bad, and maybe this helps fix the captures_build_path issue with debian's reproducible builds (those asserts probably include __FILE__)
* | Merge branch 'master' into patched-masterMarius Halden2016-12-26-7/+68
|\|
| * purple: Call imcb_buddy_nick_change() on a few whitelisted pluginsdequis2016-12-25-4/+36
| | | | | | | | | | | | | | | | The whitelist includes hangouts, funyahoo and icq. These plugins tend to have numeric or meaningless usernames. With this change, users don't have to do 'ac whatever set nick_format %full_name' anymore. Just sugar.
| * purple: include purple plugins in the 'plugins' command listdequis2016-12-25-0/+15
| |
| * purple: Use roomlist_room_serialize, fixes joining jabber chatsdequis2016-11-28-3/+17
| | | | | | | | | | | | | | The room names in 'chat list' were missing the server part. Jabber is the only prpl which implements this method as far as I can see, and it's needed to get the full name.
* | Merge branch 'master' into patched-masterMarius Halden2016-11-14-0/+16
|\|
| * Improve support for protocols which don't require a passworddequis2016-11-13-0/+10
| | | | | | | | | | | | This adds a prpl_options_t enum with flags, which mostly just brings OPT_PROTO_{NO_PASSWORD,PASSWORD_OPTIONAL} from libpurple as PRPL_OPT_{NO_PASSWORD,PASSWORD_OPTIONAL}
| * purple: fix file transfer memory managementdequis2016-11-13-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This means cancelling transfers on logout to avoid crashes, keeping track of timeouts, reffing and unreffing the xfers, listening to the callbacks from UI and purple more carefully and using the correct functions to free the correct things at the correct moments. Originally intended to fix a crash triggered when the dcc stall timeout kicks in after the account is offline, which is apparently very frequent with telegram (it sends file transfers while fetching history, and randomly disconnects a while later). Trying to fix that meant opening a can of worms, but after three days of work on this bug I'm pretty sure I've finished dealing with the resulting mess and tested all the typical edge cases.
* | comment in comment broke stuffMarius Halden2016-11-12-1/+1
| |
* | Merge branch 'master' into patched-masterMarius Halden2016-11-12-6/+39
|\|
| * purple: hack to pass server parameter to jabber's input requestdequis2016-11-04-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | Because our purple module is all about hacks, adding more can't hurt. There's a string comparison for "Enter a Conference Server". It's gettexted in the source but in practice it isn't affected by locale (bitlbee disables localization). Worst case, if this stops working, it will open an input request like it did before this commit. It also does that in purple's jabber if you don't provide a server parameter.
| * purple: fix icq login when the protocol name is "oscar"dequis2016-10-30-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Which happens when moving from non-purple to purple. Fixes trac ticket 1269 Since "oscar" doesn't exist in purple, the old code called register_protocol() to associate oscar with prpl-aim, which meant that aim accounts migrated seamlessly to purple but icq accounts broke silently, throwing incorrect password errors. Now the oscar protocol is special-cased to return prpl-aim or prpl-icq depending on the first character of the username, which is the same thing the built-in oscar protocol does.
* | Merge branch 'master' into patched-masterMarius Halden2016-10-16-22/+25
|\|
| * Turn purple_chatlist_free() into a imcb_chat_list_free()dequis2016-10-16-17/+2
| | | | | | | | | | I found myself copypasting this to jabber. Might as well make it part of the API.
| * Rename bee_chat_list_finish() to imcb_chat_list_finish()dequis2016-10-16-1/+1
| | | | | | | | | | | | | | | | | | bee_chat_list_finish is still available as a deprecated function but it will be removed before the next stable release It has never been part of any release, just keeping it for a while for the sake of being polite to the users of the discord plugin who may be using the experimental chat list branch.
| * purple: Fix handling of empty, immediate roomlist resultsdequis2016-10-08-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two issues here: 1. SIPE called in_progress(FALSE) immediately (which decreases refcount), before purple_roomlist_get_list() could return (which would normally increase refcount). The first refcount decrease steals it from the prpl, and bad things happen. Added an initialized flag to only do that decrease after it was increased first. This is similar to how pidgin sets a 'dialog' attribute after the purple_roomlist_get_list() call, and skips the unref if it's not set. 2. The code assumed that NULL return value means room listing not supported. That's not quite true, so now it checks in the prpl info to see if roomlist_get_list is defined. Also, made purple_roomlist_data more private.
* | Merge branch 'master' into patched-masterMarius Halden2016-09-25-1/+5
|\|
| * purple: Fix another issue where /join results in two channelsdequis2016-09-25-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up to a3019499665384a3dcbbc11016d256e6d4dcd26c (which actually made things worse than before for this particular case - found it by bisecting) This affected skypeweb and hangouts, maybe others. Sometimes serv_join_chat() results in a call chain like this (outermost frame first) 1. purple_chat_join 2. serv_join_chat 3. (the join_chat function of the prpl) 4. serv_got_joined_chat 5. purple_conversation_new 6. prplcb_conv_new The last one tries to find a struct groupchat by name (that's the code from the referenced commit). If it doesn't exist, it creates a new one. This usually isn't an issue because the 4th step is done asynchronously, and a groupchat is created at the end of purple_chat_join. If it's not, you end up with two groupchats, which can lead to other nasty issues. This moves the creation of the groupchat right before serv_join_chat(). That way, it always exists even if the conversation is created immediately.
* | Merge branch 'master' into patched-masterMarius Halden2016-09-24-0/+16
|\|
| * purple: support setting chat room topics (#84)Eion Robb2016-09-24-0/+16
| |
| * purple: added room listing supportjgeboski2016-09-19-0/+128
| |
* | Merge branch 'master' into patched-masterMarius Halden2016-07-26-0/+6
|\|
| * purple: Don't try to init module if it's already initializeddequis2016-07-25-0/+6
| | | | | | | | | | This only happens if the user has used / forced daemon mode (for example, when debugging with BITLBEE_DEBUG=1)
* | Merge remote-tracking branch 'upstream/jgeboski/chatlist' into patched-masterMarius Halden2016-07-20-15/+3
|\ \
| * | purple: added room listing supportjgeboski2016-07-19-0/+128
| |/
* | purple: added room listing supportjgeboski2016-07-13-0/+140
| |
* | Revert "purple: added room listing support"Marius Halden2016-07-13-124/+0
| | | | | | | | This reverts commit e83d450ef16d9a3783f5daff632c4ac57ceb8fec.
* | Merge branch 'master' into patched-masterMarius Halden2016-07-09-0/+4
|\|
| * purple: add $plugindir/purple to the plugin search pathdequis2016-06-12-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows adding bitlbee-specific purple plugins in a directory controlled by the user who starts bitlbee (as it can be defined in bitlbee.conf, PluginDir). Pidgin and finch have something similar allowing users to place plugins in ~/.purple/plugins: path = g_build_filename(purple_user_dir(), "plugins", NULL); The direct equivalent would be to use our config dir, but i'd rather not put executable modules there.
* | purple: added room listing supportjgeboski2016-06-29-0/+124
| |
* | Merge branch 'master' into patched-masterMarius Halden2016-05-26-3/+6
|\|
| * 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.
* | Save password for purple accounts on logout if password is missing or ifMarius Halden2016-05-07-0/+14
| | | | | | | | | | it has changed, this is useful for accounts using oauth e.g. purple-hangouts.
* | Allow purple and default pluginsMarius Halden2016-05-07-4/+4
|/
* purple: Also show 'title' and 'primary' messages for input requestsdequis2016-01-21-1/+12
| | | | It was showing 'secondary' only before.
* 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-46/+46
|
* 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.
* purple: assume HTML for all protocols, fixes random <> 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.