cryptodotis / irssi-otr

LibOTR functionality in Irssi.
GNU General Public License v2.0
183 stars 24 forks source link

Stop logging for an OTR session #15

Open dgoulet opened 11 years ago

dgoulet commented 11 years ago

At least, offer the option to disable logging automatically.

This should be done for the private conversation. Turn off any logging that may have access to it.

With Irssi, on the first look, it seems not that trivial but doable so I would gladly appreciate help if someone knows the irssi's insides. :)

DrWhax commented 11 years ago

Was there a way to check if logging was enabled? Because then, we could make the user aware to, disable it user a commandline /log off? I dont know exactly how logging works for irssi.

But atleast for now, we should disable that if the user has logging enabled, he's basically on his own.

dgoulet commented 11 years ago

I would like so but it requires some investigation/reverse eng. of Irssi. It is doable but now how do we do it is the question. :)

DrWhax commented 11 years ago

Ack.

jvoisin commented 9 years ago

Any status update on this?

anarcat commented 8 years ago

@jvoisin not that i know of. i filed a bug in debian as well, as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818313

i looked a bit how the plugin works, and while i am far from knowledgable about irssi plugins, i am not sure there is much we can do here.

but here's what i learned...

auto logging in irssi is managed in src/fe-common/core/fe-log.c. it's a fairly large module, and in my case, it is enabled through the autolog parameter. but logging can also be triggered (i think?) through the /log start command as well! and that is actually managed in src/core/log.c (go figure). there is actually a nifty log_stop_logging functions in there we may be able to use there, although we'd need a LOG_REC context to work with. fe-log.c finds that log record with a log_find_from_data, so that may be one way of going around it.

both /log [start|stop] and /set autolog use the log_start_logging and log_stop_logging. Unfortunately, the autolog facilites will restart logging if it was stopped, so just calling log_stop_logging probably won't work there. adding the target of the conversation to autolog_ignore_targets may work around that problem, however.

also, since the otr plugin is being merged into irssi core, i figured i would look if they fixed the problem at all - it seems not. the todo says this:

https://github.com/ahf/irssi/blob/native-otr/README.otr#L20

  1. Add setting: autolog_ignore_otr (default: true) and required API in the autolog subsystem. We want to ensure that by default Irssi shouldn't log anything between users using OTR.

i don't know why it should be a setting, in my mind it should just be off with no way to turn it on, but anyways.

one thing the logging mechanisms obey to is the log level, so maybe that is something that could be abused, somehow.

whatever the way we find to disable logging, it is probably in otr_receive() and otr_finish() that the triggers need to happen to turn it off and (optionnally??) back on.

so here you go - my general feeling is that all the bits are already there to make this work, someone just need to dig back in the code, generate a patch and test it. i am done for the night, it would be great if someone else picked that up at some point. :)

anarcat commented 8 years ago

oh and @ahf - maybe you'd like to read up on my analysis here before you start on turning off logging in the otr rewrite. :) your feedback would of course be really appreciated.

anarcat commented 6 years ago

so it seems clear that, at this point, we shouldn't expect radical changes from that merge from @ahf, which has been mostly stalled for about two years now...

from a user's perspective, I couldn't find a simple way to disable the log for a single window, temporarily, if autologging is turned on. the only way i found to turn off logging is to call /SET AUTOLOG OFF which closes all logfiles and disables logging for all windows. it's probably for the best anyways, but it doesn't fix the underlying issue here.

ahf commented 6 years ago

I'm not going to add any additional features to the OTR patches for Irssi until the "Irssi OTR community" starts to test them to the point where we can make a sound decision whether we want to merge them or not. So far I hear a lot of people being interested in kicking some life into OTR in irssi and very few people willing to test any code :-)

anarcat commented 6 years ago

i wasn't aware you were looking for testers or that the code was even ready. this is the first time you even comment on this issue... or any issue in this repository that i could find, in fact.

are there builds somewhere or should we compile it from source?

thanks.

ahf commented 6 years ago

There is no binary packages to fetch, but you can checkout the ahf/otr branch from the official irssi.git repository (https://github.com/irssi/irssi/tree/ahf/otr), compile that while passing --with-otr to ./configure and OTR should now be built-in :-) The more people that can test this the more quickly we can progress with getting it into irssi itself and start adding features! :-)

Thanks! Feel free to prod me on IRC (ahf on most of the bigger networks) if there is anything I can help with :-)

anarcat commented 6 years ago

@ahf one last thing I guess - where do we report issues or results? issues against the irssi repo?

thanks!

RRAlex commented 6 years ago

I tested it, and would be interested to see this enabled in the master branch. cheers!

ahf commented 6 years ago

Please report them against the official irssi repository, but mark the issues with [OTR] in the title. Thanks!

anarcat commented 6 years ago

so at first glance, it looks like it works. no status bar, but apparently that's a known limitation at this stage.

@ahf now the problem we have is that there's no place for people to say "it works". i'm abusing the forum here for this because we were having that conversation before, but it seems to me that if you want that kind of feedback, you should also explicitly say so.

in other words, maybe the fact that you didn't hear anything doesn't mean no one tested it - but just that they didn't find any problem with it...