Libpurple prpl init registers commands for unrelated prpls, overriding JS prpl commands

RESOLVED WONTFIX

Status

defect
RESOLVED WONTFIX
4 years ago
7 months ago

People

(Reporter: aleth, Unassigned)

Tracking

trunk

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [1.6-blocking])

STR 1
Add e.g. an ICQ account (no need to connect it, what matters is that it has a higher id number than an existing JS-XMPP account).
This registers commands for all sorts of libpurple prpls that are not prpl-icq, including prpl-jabber and prpl-yahoo.
Then, JS-XMPP commands are broken and /help lists the libpurple XMPP commands.

STR 2
Don't add any libpurple accounts, but open the new account wizzard. This is enough to call init() on libpurple prpls, and the same thing happens.

Some dumps:
adding account: account12
  prplId: prpl-icq
  getprotocolbyid()
cid: @instantbird.org/purple/protocol;1
  proto.init()
registering prpl-jabber: config
registering prpl-jabber: configure
registering prpl-jabber: nick
registering prpl-jabber: part
registering prpl-jabber: register
registering prpl-jabber: topic
registering prpl-jabber: ban
registering prpl-jabber: affiliate
registering prpl-jabber: role
registering prpl-jabber: invite
registering prpl-jabber: join
registering prpl-jabber: kick
registering prpl-jabber: msg
registering prpl-jabber: ping
registering prpl-jabber: buzz
registering prpl-jabber: mood
registering prpl-msn: nudge
registering prpl-yahoo: join
registering prpl-yahoo: list
registering prpl-yahoo: buzz
registering prpl-yahoo: doodle
registering prpl-yahoojp: join
registering prpl-yahoojp: list
registering prpl-yahoojp: buzz
registering prpl-yahoojp: doodle
Whiteboard: [1.6-blocking]
Looks like there's only an overall command registration for libpurple (init_libpurple_commands()) and this gets called when the first libpurple prpl gets inited.
purpleProtocol::Init -> purpleCoreService::Init -> init_libpurple -> purple_core_init -> static_proto_init(), defined in libpurple/Makefile.in -> loop over purple_init_$(proto)_plugin()

So, you init one libpurple prpl, you init all of them as part of the core init.

This design is probably hard to disentangle :-/
I suppose if we stopped building libpurple's yahoo, msn, and eventually jabber that would "fix" this :-|
purplexpcom is no longer being developed.
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.