mIRC Homepage

Quit notification

Posted By: Amnesia5150

Quit notification - 26/05/19 10:56 AM

First of all, forgive my English, I don't speak it ...

Here is my problem, I need two things:

1) The first is that when a nickname with which I have an open query changes nick, I see the change in that same query window, and thus be able to continue chatting directly in that same window (now it works like this: if someone changes nick, I don't see anything, and if he wrote to me again the person who changed nick, a new query would open).

2: When someone I'm chatting with in the query writes a message, the window lights up, flashes. I would need this even when that person disconnects!

That's all. Unfortunately I don't know about these things, I searched around for a while something that could do for me, but I didn't find anything. I would be grateful if you could give me a hand. Thank you!
Posted By: maroon

Re: Quit notification - 26/05/19 03:52 PM

To make the window flash when a query window, you need to observe the QUIT event, to make it flash

if ($query($nick).cid == $cid) { window -g1 $nick | echo $nick Note: $nick has quit $network at $asctime }

This checks if there's a query window open, and if it's open - it checks if it's from the same network too.

You'll need to explain your #1 again. If you have an open query window, it *does* get renamed when someone changes nick. The exceptions:

1. If someone disconnects as nick1, then rejoins as nick2, the existing query window does not rename.
2. If that nick2 opens a query window as nick2 then changes back to the original nick1, the presence of an already-open nick1 query window prevents the nick2 window from renaming to nick1.
3. If nick2 changes back to nick1 before opening the query window, then mIRC uses the existing query window like normal.
4. I haven't tested how the querylogfilename.log is handled in the above 3 situations.

You can use "/queryrn nick2 nick1" to rename a query window with the #2 restriction above, but it's going to be hard to accurately rename query windows when nick1 shows the QUIT event before nick2 re-joins the channel. Where the QUIT event checks if that nick has an open query window, it could also check to see if there's a different nick already rejoined, having matching ident@address
Posted By: Amnesia5150

Re: Quit notification - 27/05/19 09:50 AM

Hey, thanks for the help!

Let's forget about point # 1 for a moment.

I put this in mIRC

ON *: QUIT: {
if ($ query ($ nick) .cid == $ cid) {window -g1 $ nick | echo $ nick Note: $ nick has quit $ network at $ asctime}

And I did the test: I entered with a second nick from the browser and opened a query, but it didn't work: when the nick disconnected in the query window nothing happened, it didn't blink, it didn't come out of another color, nothing. What can it be?
Posted By: maroon

Re: Quit notification - 27/05/19 01:16 PM

It's supposed to flash if you have the box checked in options/display/flash_icons. The g1 uses the color in that menu for 'messages', g2 uses the color for highlight.

If what you pasted is what you put in your alt+R script, it's not the example I gave. You have a space inside the :QUIT: parameter as well as following every dollar sign, as well as allowing the command to touch the curly braces, not having the .cid property touching the parenthesis, etc.

When debugging a script, if you think the problem is caused by a problem in your IF statement, you can add a debugging echo command inside the QUIT event but above the IF statement that ALWAYS executes.

echo -s debugging echo $scriptline $script

If you see your debugging echo in the status window but don't see the commands inside the IF statement doing anything, then you know the problem is with something in the IF statement. If you don't see the echo statement either, then the QUIT statement isn't being seen either.

Also make sure to not have more than one :QUIT: event per remote script, as only the top one is used.
© 2019 mIRC Discussion Forums