mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#212762 03/06/09 08:47 AM
Joined: Aug 2003
Posts: 80
H
HM2K Offline OP
Babel fish
OP Offline
Babel fish
H
Joined: Aug 2003
Posts: 80
Looking at the on close event, it doesn't work for channels...

Quote:
Note: These events do not trigger for any other types of windows. Channel windows are handled by the on JOIN/PART events.


Like many people I have the "Keep channels open" option ticked.

This means, when I'm kicked/banned from a channel, the window remains open.

I'd like to trigger an event when I close the window, because I'm already parted by being kicked.

Closing the window, closes the window, where as part parts. You can't tie to two together.

Perhaps this is actually a bug... Perhaps On Close needs support for channels.

Should I raise this as a bug?

Thanks.


-HM2K- hm2k.org
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
The ON PART event should work for what you are wanting, as you can't be on the channel and have the window closed.
If you have left the channel by being kicked, this is handled by the ON KICK event, or if banned, the ON BAN event.

Joined: Jul 2006
Posts: 4,131
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,131
Did you read his post ? He his saying that if has been kicked, the channel window stay open because he has the 'keep channels open' option ticked.He wants to know how to trigger the fact that HE closed the window and there is, I think, no proper way to do this.
I think too that some suggestions have been already done about this situations.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Mar 2006
Posts: 395
T
Pan-dimensional mouse
Offline
Pan-dimensional mouse
T
Joined: Mar 2006
Posts: 395
Yeh I agree, it makes sence to add # targets to the on close events.


[02:16] * Titanic has quit IRC (Excess Flood)
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

I agree it would make sense, but I also think it should only trigger if you're not joined to the channel.

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

It's not a bug, but a missing feature. This probably should've been changed when the Keep channels open feature was added.

Last edited by RoCk; 03/06/09 01:09 PM.
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Code:
on *:PART:#:{
  .timer 1 1 if ([ $me ] !ison [ $chan ]) { code }
}

You could use "on me:PART:#:" if you have yourself on the mIRC User list to prevent the event from triggering on every single part.

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
on me:*:part:#:{ }

This is how I had to do it.

Joined: Aug 2003
Posts: 80
H
HM2K Offline OP
Babel fish
OP Offline
Babel fish
H
Joined: Aug 2003
Posts: 80
I don't want it to do anything on part.

When I'm kicked I want it to leave the window open.

The event I'm looking for is when I close the channel window.

This is a missing feature, thus this is a feature request.


-HM2K- hm2k.org
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Then you should make a post in the Feature Suggestions forum, with the basics of your suggestion and a linked reference to this topic.

Joined: Aug 2003
Posts: 80
H
HM2K Offline OP
Babel fish
OP Offline
Babel fish
H
Joined: Aug 2003
Posts: 80


-HM2K- hm2k.org
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
For now..

Code:
on *:join:#: .timercheckchan $+ $cid $+ # -o 0 5 checkchan $cid #
alias checkchan {
  scid $1
  if (!$window($2)) {
    .signal close $1-2
    .timercheckchan $+ $1 $+ $2 off
  }
}


Then you can use:

Code:
on *:signal:close: echo -s Window $2 on CID $1 just closed.

Joined: Jul 2008
Posts: 236
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Jul 2008
Posts: 236
Originally Posted By: 5618
Code:
on *:PART:#:{
  .timer 1 1 if ([ $me ] !ison [ $chan ]) { code }
}

You could use "on me:PART:#:" if you have yourself on the mIRC User list to prevent the event from triggering on every single part.


Originally Posted By: DJ_Sol
on me:*:part:#:{ }

This is how I had to do it.


Guys, please learn to read accurately. A man can't expect to have to repeat himself.

Joined: Aug 2003
Posts: 80
H
HM2K Offline OP
Babel fish
OP Offline
Babel fish
H
Joined: Aug 2003
Posts: 80
@hixxy seems like a dirty way of doing it, but I guess it'll work. It's still a bug or "missing feature" though really.

@s00p I think it's actually you who needs to read accurately. Please re-read my comments on why On Part isn't suitable here.

Last edited by HM2K; 20/11/09 05:29 PM.

-HM2K- hm2k.org
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Oh yeah it's definitely a nasty hack.. just wanted to show you that it's possible with what we have now, although not ideal.

And s00p was telling them to read, as he knows on part isn't suitable.

Joined: Aug 2003
Posts: 80
H
HM2K Offline OP
Babel fish
OP Offline
Babel fish
H
Joined: Aug 2003
Posts: 80
Too true, but I think continuing with the feature request is probably the best route, wouldn't you agree?

Ah my mistake then, it seemed like s00p's comment was directed at me.


-HM2K- hm2k.org
Joined: Jul 2008
Posts: 236
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Jul 2008
Posts: 236
Where did you get such a ridiculous idea that I was responding to you? Did I respond to one of your messages? Did I quote you?

Please learn to read accurately.

Last edited by s00p; 24/11/09 08:13 AM.
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Seriously soop are you that bored?

I wasn't answering the guy who posted this, I was correcting the syntax of the person I responded to.

Joined: Aug 2003
Posts: 80
H
HM2K Offline OP
Babel fish
OP Offline
Babel fish
H
Joined: Aug 2003
Posts: 80
Quote:
20. Extended on CLOSE event to work with channels.


02/04/2010 - mIRC v7.0 smile


-HM2K- hm2k.org
Joined: Apr 2010
Posts: 8
P
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
P
Joined: Apr 2010
Posts: 8
ahaha, i smell the hostility.


#support #singles on server: ukchat.serveirc.com
Page 1 of 2 1 2

Link Copied to Clipboard