New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find a less-global method of deciding when to print netsplits/mode/joins #420

Closed
GinjaNinja32 opened this Issue Feb 10, 2016 · 8 comments

Comments

Projects
None yet
4 participants
@GinjaNinja32
Contributor

GinjaNinja32 commented Feb 10, 2016

When irssi is looking for more netsplit QUITs, more MODEs, etc, any printed text to any window will cause the accumulated QUITs/MODEs/etc to be printed; I have a window set up as a 'raw' window, printing exactly what irssi receives from connected servers, with no processing. My script to do so currently requires stopping the "print starting" signal while I'm trying to print;

Irssi::signal_add_first("print starting", "ignore_signal");
$window->print($text, MSGLEVEL_NEVER) if ($window);
Irssi::signal_remove("print starting", "ignore_signal");

If I don't have this in place, the result is one netsplit line for every user, printed immediately (because my 'raw' script has printed to my raw-input window, causing netsplit detection to conclude the end of the splitting users):

-!- Netsplit *.net <-> *.split quits: SomeUser
-!- Netsplit *.net <-> *.split quits: AnotherUser
-!- Netsplit *.net <-> *.split quits: SomeOtherUser

Could this be done in a way that it doesn't rely on watching for printed text? Perhaps if the server sends something that is not another QUIT/MODE/etc?

@LemonBoy

This comment has been minimized.

Member

LemonBoy commented Feb 29, 2016

I agree it shouldn't absolutely hook the print starting signal, but I can't think of another way to solve this than to print the parts minus joins after the netsplit is over (after the timer runs out) but that way you don't get any feedback in case the person you're talking with has been split (in half ?)

@ailin-nemui

This comment has been minimized.

Contributor

ailin-nemui commented Feb 29, 2016

it could be done more granular for example on a server/channel flag and/or excluding certain message levels. could be much effort...

LemonBoy added a commit to LemonBoy/irssi that referenced this issue Apr 2, 2016

Some small adjustments to the netsplit code.
By making the signal handler hooked to the "print starting" event
smarter we can avoid dumping the whole netsplit stats for every
server/channel when a message arrives.

Issue irssi#420

LemonBoy added a commit to LemonBoy/irssi that referenced this issue Jun 26, 2016

Some small adjustments to the netsplit code.
By making the signal handler hooked to the "print starting" event
smarter we can avoid dumping the whole netsplit stats for every
server/channel when a message arrives.

Issue irssi#420
@dequis

This comment has been minimized.

Member

dequis commented Mar 11, 2017

Can we consider this fixed by #465?

@dequis

This comment has been minimized.

Member

dequis commented Jan 14, 2018

So this goes back to unfixed.

PR #465 tried to fix this

Issue #567 was a regression from that fix

PR #577 fixed that regression

Issue #809 appeared much later and its cause is still not fully understood.

PR #812 reverted most of the original fix (made the filtering a no-op)

So to get this done we have to figure out a fix to #809 that isn't a revert.

@ailin-nemui

This comment has been minimized.

Contributor

ailin-nemui commented Jan 14, 2018

one thing I noticed

split->printed = TRUE;

here the whole split is marked as printed. note how this gets triggered even when you try to filter out a single channel for display; it would need to be done per channel

@ailin-nemui

This comment has been minimized.

Contributor

ailin-nemui commented Feb 16, 2018

fixed according to @GinjaNinja32 , reopen when this turns out to be wrong

@dequis

This comment has been minimized.

Member

dequis commented Feb 16, 2018

Wait, what? The current code has most of the filtering disabled

@dequis

This comment has been minimized.

Member

dequis commented Feb 16, 2018

11:49 < dx> ...i should look here before commenting on github
11:50 < dx> i don't know what "a while" is but we reverted all of this code very recently
11:51 < Nei[e]> I think he's running git
11:51 < dx> the current code has one check, sure, but it's a tiny subset of what was checked before
11:52 < Nei[e]> probably that;s all it took
11:52 < GinjaNinja32> dx: my original issue is fixed; the current code may not be perfect, but the reason I opened that issue is gone
11:53 < GinjaNinja32> previously my $window->print() would make irssi decide the netsplit was lots of little netsplits unless I ignored "print starting"
11:53 < dx> GinjaNinja32: oh! you had a script that broke it?
11:54 < Nei[e]> see the original issue report :)
11:54 < GinjaNinja32> I have a script that prints every incoming line to a window called "raw" that sorts (chansort.pl) at the end of my window list
11:54 < dx> it's been so long
11:54 < GinjaNinja32> useful for diagnosing weird issues sometimes
11:55 < dx> and IMO we shouldn't aim to fix just that niche use case
11:55 < GinjaNinja32> when I originally wrote it I needed to signal_add_first() something to ignore "print starting", or irssi would print separate lines for each user who split
11:55 < dx> on the other hand i don't want to deal with subtle netsplit related issues anymore so maybe it's better to claim it's done with this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment