mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2007
Posts: 11
B
Pikka bird
OP Offline
Pikka bird
B
Joined: Oct 2007
Posts: 11
Hello,
The is no indicators to know that a channel window is closed when not connected to a server.
Explanation:
Connection to a server
Joining a # channel
Keep this # channel open and disconnect to the server
Then the 'on part' event is not used when closing this # channel.
May be useful ti get this close in the on close event ?

I red the mIRC Help and i only found:
(on OPEN|CLOSE)
Note: These events do not trigger for any other types of windows. Channel windows are handled by the on JOIN/PART events.

Thank you smile

EDIT: mIRC 6.3

Last edited by Biggoude; 03/10/07 05:25 PM.
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
This is not a bug, it is by design. This may or may not be a good Feature Suggestion.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Seems to me that this should fall under ON QUIT as the channel should show a quit message when you disconnected from the network.

Joined: Mar 2006
Posts: 395
T
Pan-dimensional mouse
Offline
Pan-dimensional mouse
T
Joined: Mar 2006
Posts: 395
The OP makes a valid point.

When I "Keep channels open" I often still use them.

An addition to open/close when a JOIN or PART is not called would be great.

I'd definately post a request under the Feature Request section.


[02:16] * Titanic has quit IRC (Excess Flood)
Joined: Jan 2006
Posts: 111
N
Vogon poet
Offline
Vogon poet
N
Joined: Jan 2006
Posts: 111
As long as the channel window is open you can refer to it by using $chan(n) where n indicates the window number. $chan(0) gives you the number of open channel windows. Maybe that will help?

EDIT: you can also use $chan(#channelname).status to see whether the window is still open.

Last edited by noMen; 05/10/07 09:02 PM.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
That's not really what he is referring to. The OP wants to know when the window closes and be able to run something when it does. The only way to do that now is to run a timer to constantly check the status of the window to see if it's still open. That's not a great method. Having an OPEN/CLOSE work for disconnected channels or some other method, could be useful.


Invision Support
#Invision on irc.irchighway.net
Joined: Jan 2006
Posts: 111
N
Vogon poet
Offline
Vogon poet
N
Joined: Jan 2006
Posts: 111
I know, but MY point was that there could be another way to do it. A timer is not necessary if he rewrites his script. It all depends on what he wants. Does he really want to do something at the moment he closes the channel window? If so, then he could use a timer. If not he could check the window's status at the moment he reconnects.

Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Actually a timer isn't always a viable option. It's ONLY a viable option if you're wanting to check if the window is open or closed.

I know a few people who do not use mIRCs logging options, and instead, use their own logging scripts. With this in mind, note that you can fetch a line from the window when you're performing a part. ie:

Code:
^*:part:#:{ if ($nick == $me) { echo -s $line(#,5) } }

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
The original post was in regards to knowing when the window closed, not handling stuff in that window while it's open. Think of the on CLOSE event. The OP was wanting a similar ability to that event for channels that are still open after disconnecting. The only current way to know right when a channel is closed is to use timers, which isn't a nice way to do it.

As pointed out earlier, this isn't a bug, and should be posted as a feature suggestion. I think it's a good suggestion.


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
That's fine, but isn't related to actually closing the window if it's open while disconnected.


Invision Support
#Invision on irc.irchighway.net
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
he can use Cwnd.dll and subclass the channel window to know what happen with this window...


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jan 2006
Posts: 111
N
Vogon poet
Offline
Vogon poet
N
Joined: Jan 2006
Posts: 111
I am only suggesting workarounds since there isn't any event to handle this situation!

Last edited by noMen; 06/10/07 07:04 PM.
Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Originally Posted By: mIRC Help File - on open/close
Note: These events do not trigger for any other types of windows. Channel windows are handled by the on JOIN/PART events.

Originally Posted By: Riamus2
That's fine, but isn't related to actually closing the window if it's open while disconnected.


If you mean you want to CLOSE the window when you're disconnected, then I'd agree. However, from what I understand, this person wants to be able to check when the channel is being closed (or parted such as /partall) while offline. See how it relates now?

Since "on part" doesn't trigger while you are offline (and since on close doesn't work for channels -- since on part is supposed to handle it), there is no way to do anything with the channel buffer when closing the window while offline.

Checking if a channel window is open or closed isn't a big issue. Timers can do that easily enough. But the people that want this event, generally want it for more than just saying "oh hey this window is now closed."


Link Copied to Clipboard