We're working on a plugin for pidgin to enable secure group chat
messaging  based on a library called (n+1)sec .
The way it works is such that the plugin binds to a group chat created
by Pidgin (could be any protocol, but we're currently using XMPP) and
filters any incoming and outgoing communication through the (n+1)sec
library. Not unlike in the OTR plugin. Through some tweaks in the GUI,
the plugin then allows any subset of the clients in the group chat to
securely exchange a secret that they'll then use for further
communication. We call such subset a 'channel'.
Now since there can be multiple channels in one chat room, we'd
preferably want to have one output imhtml widget per channel for users
not to get confused about where a communication is happening.
The implementation we have right now does that by creating a GTK
Notebook widget inside a chat room window and adds one page per channel
into it. This isn't ideal mostly because we need to reimplement many
parts that have already been implemented by Pidgin (e.g. recreate the
output IMHtmlWidget, setup notifications,...).
We were thinking a nicer approach would be if we could somehow hijack
the existing connection in a room such that each channel would appear as
a new connection and then use that to create new PidginConversations. So
far - though - I was unable to find a straight forward way to do this so
any pointer in the right direction would be greatly appreciated.