mIRC Home    About    Download    Register    News    Help

Print Thread
No indicators : channel close when not connected #187326 03/10/07 05:21 PM
Joined: Oct 2007
Posts: 11
B
Biggoude Offline OP
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.
Re: No indicators : channel close when not connected [Re: Biggoude] #187347 03/10/07 10:27 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
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"
Re: No indicators : channel close when not connect [Re: Biggoude] #187365 04/10/07 02:04 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
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.

Re: No indicators : channel close when not connect [Re: RusselB] #187371 04/10/07 02:20 AM
Joined: Mar 2006
Posts: 393
T
The_JD Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
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)
Re: No indicators : channel close when not connect [Re: The_JD] #187465 05/10/07 08:59 PM
Joined: Jan 2006
Posts: 111
N
noMen Offline
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.
Re: No indicators : channel close when not connect [Re: noMen] #187474 06/10/07 12:29 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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
Re: No indicators : channel close when not connect [Re: Riamus2] #187494 06/10/07 07:57 AM
Joined: Jan 2006
Posts: 111
N
noMen Offline
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.

Re: No indicators : channel close when not connect [Re: noMen] #187496 06/10/07 08:17 AM
Joined: Feb 2005
Posts: 342
R
Rand Offline
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) } }

Re: No indicators : channel close when not connect [Re: noMen] #187502 06/10/07 05:55 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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
Re: No indicators : channel close when not connect [Re: Rand] #187503 06/10/07 05:55 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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
Re: No indicators : channel close when not connect [Re: Riamus2] #187507 06/10/07 06:57 PM
Joined: Jul 2006
Posts: 3,574
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,574
he can use Cwnd.dll and subclass the channel window to know what happen with this window...


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: No indicators : channel close when not connect [Re: Riamus2] #187508 06/10/07 07:04 PM
Joined: Jan 2006
Posts: 111
N
noMen Offline
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.
Re: No indicators : channel close when not connect [Re: Riamus2] #187522 07/10/07 06:16 AM
Joined: Feb 2005
Posts: 342
R
Rand Offline
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."