aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/nogaim.h
Commit message (Collapse)AuthorAgeLines
* Manual merge with wilmer's approach to handling missing protocolsdequis2016-11-21-4/+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!)"
* Improve handling of unknown protocols / missing pluginsdequis2016-11-19-0/+5
| | | | | | | | | | | | | | | 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.
* Improve support for protocols which don't require a passworddequis2016-11-13-0/+21
| | | | | | 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}
* Added an interface for the listing of existing chatroomsjgeboski2016-09-19-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* Show the enabled/disabled protocols in the 'plugins' command outputjgeboski2016-05-25-0/+2
|
* Implemented plugin information for external pluginsjgeboski2016-05-25-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add imcb_buddy_nick_change(), like nick_hint but strongerdequis2016-03-20-0/+1
| | | | | | | 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/
* 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.
* Show a nicer message when a protocol is disabled in account adddequis2015-11-23-0/+1
| | | | | | | | | | | | 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-1/+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!
* IRC self-message support (messages sent by yourself from other clients)dequis2015-10-30-1/+2
| | | | | | | | | | | | | | | | | | | | | | 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.
* Remove a few stale functions from struct prpl.Wilmer van der Gaast2015-02-22-8/+0
|
* Reindent everything to K&R style with tabsIndent2015-02-20-81/+82
| | | | | | | 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.
* irc_commands: implemented KICK supportjgeboski2015-01-29-0/+5
| | | | | | | | | | | With similar commands being supported, such as INVITE, the KICK command should be supported as well. The key motivation behind supporting KICK is having for having a way to remove users from group chats. As of now, there is no way for a bitlbee user to remove a user from a group chat. With no current KICK implementation, it made using this command a prime candidate for the UI side of this implementation. In addition, the KICK command has been supported in the control channel as well. This is to keep the INVITE/KICK pair consistent.
* Add handle_is_self() prpl function to fix JID mismatch confusion bugsdequis2015-01-25-0/+3
| | | | | | | | | When bee_chat needs to check for self messages, it can call this function to let the protocol implementation do the comparison. In the case of jabber, sometimes the server reports a different username after login, this one is stored in jd->internal_jid, and the one that is used for login isn't changed
* 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-2/+2
| | | | | | | 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.
* Merge mainline.Wilmer van der Gaast2012-11-17-4/+0
|\
| * Cleaning up struct im_connection a little bit.Wilmer van der Gaast2012-11-11-4/+0
| |
* | Extend keepalive code to time out connections when pings don't getWilmer van der Gaast2012-11-11-0/+2
|/ | | | | acknowledged, using this for Twitter streams and MSN so far.
* Removing some fully dead code.Wilmer van der Gaast2012-10-19-1/+1
|
* First bits of CTCP support to contacts. (Try /CTCP VERSION on a JabberWilmer van der Gaast2010-12-06-0/+9
| | | | | contact.)
* 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.
* Removed problematic include from nogaim.h. (Bug #695)Wilmer van der Gaast2010-10-21-2/+0
|
* Merging mainline, which includes a huge msnp13 merge.Wilmer van der Gaast2010-10-02-0/+2
|\ | | | | | | | | | | Not 100% sure about the OpenSSL merge, should double check that but I'm currently offline.
| * Merge mainline.Wilmer van der Gaast2010-08-21-1/+2
| |\
| * | Allow changing the display_name, now permanently!Wilmer van der Gaast2010-08-14-0/+2
| | |
* | | First step in this merge. Mostly a bzr merge and then a cleanup of conflictsWilmer van der Gaast2010-08-24-0/+5
|\ \ \ | |_|/ |/| | | | | | | | and parts I want to/have to redo (because of ui-fix).
| * | add an option to disable otr on twitter (and other unsuitable protocols)Sven Moritz Hallberg2010-06-03-4/+5
| | |
| * | merge in bitlbee 1.2.6Sven Moritz Hallberg2010-06-03-0/+2
| |\ \
| * \ \ merge in bitlbee 1.2.5Sven Moritz Hallberg2010-06-03-13/+13
| |\ \ \
| * \ \ \ merge in bitlbee 1.2.4Sven Moritz Hallberg2010-06-03-1/+12
| |\ \ \ \
| * \ \ \ \ pretty blind try at merging in the latest trunkSven Moritz Hallberg2009-03-12-3/+3
| |\ \ \ \ \
| * \ \ \ \ \ merge in latest trunkSven Moritz Hallberg2008-07-17-6/+2
| |\ \ \ \ \ \
| * | | | | | | remove old away_devoice stuffSven Moritz Hallberg2008-02-09-1/+0
| | | | | | | |
| * | | | | | | - add support for setting ops/voice according to OTR msgstateSven Moritz Hallberg2008-02-09-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add 'otr trust' user command - support non-otr messages during keygen - run otr messages through strip_html - interpret <b> and <i> tags in html messages - record max message size in prpl - add 'encrypted' flag to user_t - cosmetics
* | | | | | | | Pass "user is mobile" info coming from OSCAR up to BitlBee and show mobileWilmer van der Gaast2010-08-21-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | people as away=Mobile. Bug #462 (and others for other protocols).
* | | | | | | | libpurple: Fix typing notifications (in and out). Closes #671.Wilmer van der Gaast2010-08-20-1/+1
| |_|_|_|_|_|/ |/| | | | | |
* | | | | | | Allow protocol modules to keep per-contact protocol-specific data. UseWilmer van der Gaast2010-08-07-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this in the Twitter module to remember the id and timestamp of a contact's last tweet, which can later be used for simple replies/retweets.
* | | | | | | OpenSolaris (non-gcc) fixes, patches from Dagobert Michelsen <dam@opencsw.org>Wilmer van der Gaast2010-08-07-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with some changes.
* | | | | | | Source documentation update, including a short HACKING file.Wilmer van der Gaast2010-07-28-21/+0
| | | | | | |
* | | | | | | Adding protocol-specific chatroom settings. First one to use this: AIMWilmer van der Gaast2010-07-24-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | chatrooms to use exchange numbers other than 4.
* | | | | | | Adding easy migration from old show_offline/away_devoice settings, andWilmer van der Gaast2010-07-19-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | documentation.
* | | | | | | libpurple: Handle incoming authorization requests.Wilmer van der Gaast2010-07-17-0/+1
| | | | | | |
* | | | | | | Merging killerbee stuff, bringing all the bleeding-edge stuff together.Wilmer van der Gaast2010-06-07-0/+2
|\ \ \ \ \ \ \
| * \ \ \ \ \ \ Merging stuff from mainline (1.2.6).Wilmer van der Gaast2010-04-24-0/+2
| |\ \ \ \ \ \ \ | | | |_|_|_|_|/ | | |/| | | | |
| * | | | | | | Merging in killerbee stuff (just file transfers and maybe a few things fromWilmer van der Gaast2010-03-21-0/+5
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mainline). Once I add ft support glue to protocols/purple/ I guess this will all go into killerbee.
| * \ \ \ \ \ \ \ Merging in head.Wilmer van der Gaast2010-03-14-8/+8
| |\ \ \ \ \ \ \ \ | | | |_|_|_|_|_|/ | | |/| | | | | |
| * | | | | | | | Merging in mainline, including improved away/status stuff.Wilmer van der Gaast2010-03-07-4/+3
| |\ \ \ \ \ \ \ \
| * | | | | | | | | Fixed compatibility with non-libpurple version: oscar is now recognizedWilmer van der Gaast2009-11-23-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as a protocol name, and removed prpl- hack from nogaim.c.