glowing-bear icon indicating copy to clipboard operation
glowing-bear copied to clipboard

OTR status indicator

Open jcharaoui opened this issue 9 years ago • 9 comments

I'm still new to weechat / glowing-bear, so I'm not certain if this request is in the project's scope, but a status indicator for OTR (unauthenticated, encrypted, authenticated) in private conversations would be very useful.

jcharaoui avatar Nov 23 '16 19:11 jcharaoui

Hi @jcharaoui - OTR appears to be implemented as a script in WeeChat. I've never used it myself, so I was wondering if you could help me to figure out whether this is technically possible. Do you know how the OTR script sets the status bar message in WeeChat? Glowing Bear uses a fairly fixed protocol (WeeChat relay protocol), so I don't know whether it's possible to get this information.

The easiest workaround would be if you could convince OTR.py to put the status in the buffer's topic, which shouldn't mess with UX at leats in queries.

lorenzhs avatar Nov 23 '16 19:11 lorenzhs

09:33:00 	<>	Add an OTR item to the status bar by adding '[otr]' to the config setting
09:33:00 	<>	weechat.bar.status.items. This will show you whether your current conversation
09:33:00 	<>	is encrypted, authenticated and logged. /set otr.* for OTR status bar
09:33:00 	<>	customization options.

There is also https://github.com/weechat/weechat/issues/298 for native OTR.

Edit: this is from the /help otr quickstart section.

Mikaela avatar Nov 24 '16 07:11 Mikaela

2016-11-24 10:00:19+0200 Option changed: weechat.bar.title.items = "buffer_title,[otr]"" (default: "buffer_title")

Makes the OTR status visible in WeeChat itself, but Glowing Bear continues to show the hostmask.

Mikaela avatar Nov 24 '16 08:11 Mikaela

We can add a function in otr.py to export the status of conversation. this status can be read by relay (or any other script) with weechat.info_get()

weechatter avatar Nov 24 '16 08:11 weechatter

From a discussion in #glowing-bear just now <FlashCode> Mikaela: native OTR is planned, I even read the docs some days ago

Of course doesn't mean that it will be here immediately, but imho it would be better to wait for that before adding GB integration.

Vaesper avatar Nov 24 '16 08:11 Vaesper

Hmm. It seems that infolist allows access to the bar: http://www.weechat.org/files/doc/devel/weechat_relay_protocol.en.html#object_infolist (but we don't currently support infolist). Maybe it would be a nice feature to support this in general, and not just as a special case for OTR?

lorenzhs avatar Nov 24 '16 08:11 lorenzhs

I don't use GB but i think it would be a great benefit for your software ;-) I am going to add the export to otr.py.

weechatter avatar Nov 24 '16 08:11 weechatter

@lorenzhs ah, yes, my argument was mainly based on the assumption that any work done now would be made obsolete when OTR was moved to native weechat. If a more generic support for bar items is an option that might be worth looking into.

Vaesper avatar Nov 24 '16 08:11 Vaesper

The latest weechat-otr master sets buffer local vars with OTR status if anyone wants to try integrating with Glowing Bear.

https://github.com/mmb/weechat-otr/blob/master/weechat_otr.py

See https://github.com/mmb/weechat-otr#buffer-local-variables

If it works out let me know and I'll create a new release.

mmb avatar Dec 14 '16 06:12 mmb