| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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!)"
|
|
|
|
|
|
| |
RIP
The previous commit already handled the part of telling users.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The previous one seemed to imply a "file not found" error, which is
misleading.
|
|
|
|
|
|
|
| |
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/
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Just a trivial wrapper over irc_rootmsg(), but will help me to slightly
reduce the ugliness of an unavoidably ugly hack for libpurple.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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_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
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
taking down every IM connection 2m after setup.
|
|
|
|
|
| |
acknowledged, using this for Twitter streams and MSN so far.
|
| |
|
|
|
|
|
|
|
|
| |
"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.
|
|
|
|
|
|
| |
add new irc_usermsg, irc_usernotice.
deliver user-specific messages from libotr as notices to that user.
|
|
|
|
|
|
| |
OAuth login, which requires user action. This mostly solves problems with
OSCAR login silently failing, but may also be useful in other places.
|
|
|
|
|
|
| |
a payload length, which seems like a fair assumption). This should solve
problems with logging in with dodgy contact/membership lists.
|
|
|
|
|
|
| |
prpl->logout() since the buddy_data functions would like some structs to
still exist.
|
|
|
|
|
| |
with some changes.
|
|
|
|
|
| |
This should stop the odd left+joins that were happening sometimes.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
| |
original unstripped version (without ugly underscores, also).
|
| |
|
|
|
|
|
|
| |
ignored though. Also removing the old chat.[ch] files since they're really not
important anymore.
|
| |
|
| |
|
|\ |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | | |
changes that happened since 1.2.4.
|
| | |
| | |
| | |
| | |
| | | |
user. Temporary work-around: set timezone to +720 or so. :-P
|
| |\| |
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
modules.
|
| |\ \ \ |
|
| |\ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
as a protocol name, and removed prpl- hack from nogaim.c.
|
| |\ \ \ \ \ |
|