IrssiNotifier icon indicating copy to clipboard operation
IrssiNotifier copied to clipboard

Support for non-channel/server hilights

Open mrc0mmand opened this issue 9 years ago • 9 comments

Hello!

Would it be possible to add a support for hilights which don't belong to any channel/server? Some plugins just have a window where they print their output, but even when a message has MSGLEVEL_HILIGHT and MSGLEVEL_MSGS flags, it doesn't make it to notification server (these messages have empty $lastMsg variable because they don't emit message {public,privmsg,dcc,etc.} signals).

Thank you.

mrc0mmand avatar Feb 19 '16 23:02 mrc0mmand

Does highlights apply to those messages anyhow?

murgo avatar Feb 21 '16 13:02 murgo

As I said - hilights for these messages meet the same criteria as the 'regular' (channel) hilights (they have same level - MSGLEVEL_MSGS|MSGLEVEL_HILIGHT). The only problem is that they don't emit any message * signal (these signals can't be emitted by messages without a valid server object), thus the $lastMsg variable here is empty and the message won't get pushed into the notification queue.

mrc0mmand avatar Feb 22 '16 20:02 mrc0mmand

Hopefully fixed by #165, needs some testing

murgo avatar Mar 22 '16 01:03 murgo

Thanks for the info! Unfortunately, now irssinotifier.pl has a strange behavior when a non-channel hilight occurs. Instead of that hilight it sends (probably) the last message from a channel pool to the push queue. So instead of a non-channel hilight I see some random (from my point of view) message in my IrssiNotifier app (or push notification).

mrc0mmand avatar Mar 23 '16 16:03 mrc0mmand

I thought that might happen, but hasn't happened for me so far. Do you have any idea how to reproduce it?

murgo avatar Mar 25 '16 19:03 murgo

If it's only tripping the print_text signal then we need to realize that somehow by inspecting $dest? Alternately, turn what is print_text now into a helper function that each signal handler calls, including a new print_text handler (for non-server hilights), and instead of saving global variables, we just pass the msg, nick, dest, etc content to the other function. I just didn't want to overhaul it that much in my last pull request.

I don't get double messages from having hilightwin.pl running, so I'm sorry I didn't notice this.

Zannick avatar Mar 26 '16 00:03 Zannick

Here's a simple plugin which reproduces aforementioned issue. Just set irssinotifier_screen_detached_only and irssinotifier_away_only options to OFF and load the script. You should receive a push message every 2 seconds containing a last message from your channel pool (instead of 'test hilight' from '&@hilight_test' window).

mrc0mmand avatar Mar 26 '16 19:03 mrc0mmand

You seem to be pretty handy with Perl scripting, maybe you could fix it yourself and send a pull request? :)

If not, I'll take a look at this some day...

On Sat, 26 Mar 2016 21:50 Frantisek Sumsal, [email protected] wrote:

Here's a simple plugin https://gist.github.com/mrc0mmand/4425e70c991cf670d43d, which reproduces aforementioned issue. Just set irssinotifier_screen_detached_only and irssinotifier_away_only options to OFF and load the script. You should receive a push message every 2 seconds containing a last message from your channel pool.

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub https://github.com/murgo/IrssiNotifier/issues/178#issuecomment-201914090

murgo avatar Mar 26 '16 20:03 murgo

I can definitely look into it, but it won't be in the nearest future. Nevertheless, thank you both for all your effort so far, patching will be much easier now, thanks to the information you provided.

mrc0mmand avatar Apr 03 '16 12:04 mrc0mmand