mIRC Home    About    Download    Register    News    Help

Print Thread
[v7.68.1100] Batch or znc.in/playback #270263 11/05/22 06:55 PM
Joined: Jan 2004
Posts: 1,341
L
Loki12583 Online OP
Hoopy frood
OP Online
Hoopy frood
L
Joined: Jan 2004
Posts: 1,341
Upon upgrading to v7.68.1100 I was met with dozens of old messages (from/to myself), which were processed by my open/text scripts. It was not very nice for all those new browser tabs to open and begin beeping.

These old messages are now received every time connecting to the server.

I am using znc, query buffer size is set to 50 and 'Auto Clear Query Buffer' is unchecked. I do not know if these are the default values or values I set years ago. Or even if these are relevant to the feature in question.

So now I've got to upgrade all my scripts or muck around with my znc settings?

Re: [v7.68.1100] Batch or znc.in/playback [Re: Loki12583] #270265 12/05/22 08:01 AM
Joined: Dec 2002
Posts: 5,104
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,104
Thanks for your bug report. I am afraid I have little experience with ZNC, so I cannot say why this would happen. The beta has simply added support for IRCv3 echo-message. The support for echo-message is an IRCv3 server-side setting that causes the server to echo messages back to confirm delivery of sent messages.

From what I understand, it can also be used to replace the ZNC self-message feature and can be used by the znc.in/playback feature?

That said, znc.in/playback appears to have been superceeded by IRCv3 "chathistory". Most clients from this point onwards are supporting IRCv3 as a standard instead of ZNC-specific features, so this may require changes to scripts.

Quote
Upon upgrading to v7.68.1100 I was met with dozens of old messages (from/to myself), which were processed by my open/text scripts. It was not very nice for all those new browser tabs to open and begin beeping.

Is this a setting that you have enabled in ZNC? To send mIRC a chat history on connect? How is this working in v7.68? Are you using a script to parse these messages in v7.68?

Are you using a self-message script like the one mentioned on the ZNC Query Buffers page that links to this self-message script page?

Update: I have just tested v7.68 and v7.68.1100 with ZNC and its query buffer feature. In v7.68, ZNC only plays back messages you received from others. In v7.68.1100, with echo-message enabled, ZNC also plays back messages that you sent. That is what you are seeing, which means that you would need to update your script to handle those messages as well.

This is the same issue as when users first tried to use ZNC with the self-message and playback features - you needed to use a script to correctly handle the custom ZNC messages.

Update2: I tested again using a beta that enables support for parsing ZNC self/playback messages into appropriate windows. This is code that I decided -not- to include in the v7.68.1100 as I was concerned it would interfere with existing ZNC scripts but as ZNC is doing its own thing here with echo-message, I thought I would test out the code. The code specifically changes how mIRC handles PRIVMSGs that have your nick as the source and a different nick/channel as the target. A client should normally not receive these types of messages. However, some services, eg. ZNC, can send them. In my beta, mIRC will now display these as if sent by your nick in the appropriate query/channel window.

Unfortunately, it's not that simple.

The PRIVMSG parsing routine handles at least ten different PRIVMSG contexts, and supports many features, eg. updating the IAL, triggering notify, resetting idle time, playing sounds, speaking text, triggering script events, flood protection, CTCPs, ignoring lines, stripping control codes, updating tab history, etc.

The playback buffer that ZNC sends to mIRC on connect includes messages that you have already received as well as messages that you have not yet received.

The messages that you have already received have previously triggered all kinds of events. But since you are now receiving them again, they are triggering those same events again.

The message you have not yet received are triggering events as expected.

As mentioned in various places on self-message / znc.in/playback / chathistory documentation, a client needs to remember the timestamp of the last message it received in order to know the difference between messages it has already received and new incoming messages, so that the client can handle these differently. This means mIRC would need to save the timestamp of the last message received for every query/channel and to process messages arriving after this timestamp as new messages, and messages before this timestamp as old, already-received messages.

It's also not clear whether messages with your nick as source and a different nick/channel as target should trigger the above events, since these are technically messages that you have already sent to someone else.

Last edited by Khaled; 12/05/22 12:10 PM.
Re: [v7.68.1100] Batch or znc.in/playback [Re: Khaled] #270266 12/05/22 04:23 PM
Joined: Jul 2014
Posts: 279
TECO Offline
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2014
Posts: 279
I also use znc and I'm using beta version 7.68.1100 and I don't see any problems.


TECO
irc.PTirc.org (Co-Admin)
Re: [v7.68.1100] Batch or znc.in/playback [Re: TECO] #270268 12/05/22 09:19 PM
Joined: Jan 2004
Posts: 1,341
L
Loki12583 Online OP
Hoopy frood
OP Online
Hoopy frood
L
Joined: Jan 2004
Posts: 1,341
Okay, messages are received from myself which previously were not. The new behavior was extra confusing to me that these kept appearing every time I connected - but this was because of my scripts (or rather - the script needed to do more). I was already sending a clearbuffer message to znc every time I received a message. This took care of the playback from other users. But when I received these messages from myself, I processed them as expected but did not issue a clearbuffer (because I had not needed to in the past). So I'll issue that command now and that'll be fine.

The only other problem then is receiving back messages I *send* which I believe is what you're referring to in your edits and the other filed report(s). Sending messages to myself means that the scripts process on the first received message and also on the echoed copy of sending it. Duplicated messages also appear in the playback, if you handle that separately.

Code
<- @time=2022-05-12T21:01:27.049Z :Membear!Membear@cloak-x96fe2.com PRIVMSG Membear :this is a single message
-> irc.server.net PRIVMSG *status :clearbuffer Membear
<- @time=2022-05-12T21:01:27.090Z :Membear!Membear@Membear.vhost.Net PRIVMSG Membear :this is a single message
-> irc.server.net PRIVMSG *status :clearbuffer Membear
<- :*status!znc@znc.in PRIVMSG Membear :1 buffer matching Membear has been cleared
<- :*status!znc@znc.in PRIVMSG Membear :0 buffers matching Membear have been cleared


Last edited by Loki12583; 12/05/22 10:25 PM.
Re: [v7.68.1100] Batch or znc.in/playback [Re: Loki12583] #270273 15/05/22 12:19 PM
Joined: Dec 2002
Posts: 5,104
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,104
Quote
The only other problem then is receiving back messages I *send* which I believe is what you're referring to in your edits and the other filed report(s). Sending messages to myself means that the scripts process on the first received message and also on the echoed copy of sending it. Duplicated messages also appear in the playback, if you handle that separately.

When echo-message is enabled, mIRC will filter out echoed messages, so scripts should never see them, unless they are using on PARSELINE.

In the next beta, I will be adding an on PARSELINE identitifer $parseem that is set to $true if mIRC thinks the incoming line is an echoed message.

Re: [v7.68.1100] Batch or znc.in/playback [Re: Khaled] #270276 16/05/22 06:36 PM
Joined: Jan 2004
Posts: 1,341
L
Loki12583 Online OP
Hoopy frood
OP Online
Hoopy frood
L
Joined: Jan 2004
Posts: 1,341
Using beta 1159

I am messaging myself to communicate between different mIRC instances. All messages are sent from Client A. $parseem is always false on Client B.

Messaging myself on Client A - two of the same message are received on Client B and processed twice by text events.

Messaging another user on Client A - my sent message appears on Client B as being sent from myself (in a query window for myself and not for the other user). $nick == $me for this text event.

Code
on *:parseline:in:*:echo -sg $parsetype :: $parseem :: $parseline

in :: $false :: @time=2022-05-16T18:17:55.551Z :znc.in BATCH +dbf4e8a5b4b5f5a7b845a79a430f533c znc.in/playback othernick
in :: $false :: @batch=dbf4e8a5b4b5f5a7b845a79a430f533c;time=2022-05-12T21:05:44.697Z :Membear!Membear@cloak-bu7gf9.com PRIVMSG othernick :help
in :: $false :: @time=2022-05-16T18:17:55.551Z :znc.in BATCH -dbf4e8a5b4b5f5a7b845a79a430f533c
in :: $false :: @time=2022-05-16T18:17:55.551Z :znc.in BATCH +32ab61efd54730ee72491f74037329fc znc.in/playback Membear
in :: $false :: @batch=32ab61efd54730ee72491f74037329fc;time=2022-05-16T18:17:46.274Z :Membear!Membear@cloak.com PRIVMSG Membear :2:17
in :: $false :: @batch=32ab61efd54730ee72491f74037329fc;time=2022-05-16T18:17:46.307Z :Membear!00000@Membear.vhost.Net PRIVMSG Membear :2:17
in :: $false :: @time=2022-05-16T18:17:55.551Z :znc.in BATCH -32ab61efd54730ee72491f74037329fc

Re: [v7.68.1100] Batch or znc.in/playback [Re: Loki12583] #270277 16/05/22 08:18 PM
Joined: Dec 2002
Posts: 5,104
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,104
Thanks for your bug report. I have not been able to reproduce any issues so far with how echo-message or $parseem are working.

Here are the steps that I followed to try to reproduce your issue:

1) Install a clean copy of mIRC using portable mode to the documents folder with no scripts or addons.
2) Run this copy of mIRC.
3) Connect to the server using /server irc.snoonet.org:+6697 -i nick1
4) Connect to the server using /server -m irc.snoonet.org:+6697 -i nick2
5) Open two debug windows for both status windows
6) Open a query window from nick1 to nick2
7) Open a query window from nick2 to nick1
8) Send a message from nick1 to nick2

When I follow the above steps on Snoonet, I see:

1) nick1 sends one message to nick2.
2) nick2 receives one message, $parseem is $false, and should be since nick2 is only receiving a message.
3) nick1 receives an echo and $parseem is $true for the echo, $false for all other events.

If you follow the above steps, are you able to reproduce the issue?