mIRC Home    About    Download    Register    News    Help

Print Thread
#53551 11/10/03 01:25 AM
Joined: Oct 2003
Posts: 6
R
Rdk Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Oct 2003
Posts: 6
It would be nice if the ON Nick event is channel based. The global method makes it very difficult to track which channel the user is on if that user is on several channels your on.

#53552 11/10/03 01:32 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
This is what the server sends
:nick!identd@some.host NICK :newnick
As you can see, there is no channel parameter involved, you need to loop through $comchan($nick,N).

#53553 11/10/03 01:35 AM
Joined: Oct 2003
Posts: 6
R
Rdk Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Oct 2003
Posts: 6
This is what Ive been doing for the past few years.

However it would be nice if mIRC can capture that event outside the server's action smile

a feature to be considered one day.

#53554 11/10/03 01:40 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Well, if you mean if mirc could provide, say $channels, or $targs or such for this and quit etc, then yes it would be nice, and previously suggested too laugh

Edit: Thinking a lil more, you would still need to loop to echo to each window anyway, so...... grin

Last edited by Iori; 11/10/03 01:41 AM.
#53555 11/10/03 01:43 AM
Joined: Oct 2003
Posts: 6
R
Rdk Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Oct 2003
Posts: 6
I forgot bout the On Quit event. grins.

Yes thats exactly what i meant thanks Iori smile

Sits and waits for it to be eventually be coded in so I can remove the loops.

smile

#53556 11/10/03 02:20 AM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Well I think mIRC could do that loop internally and just let we use ON *:NICK:<*|?|#[,#]>:{ }. Same with ON QUIT. Shouldn't it be easy to implement since mIRC has all the necessary control to do so?
This would be nice, in my opinion.

Last edited by cold; 11/10/03 03:05 AM.

* cold edits his posts 24/7
#53557 11/10/03 09:19 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Based on what the on nick and on quit events mean, I don't like this. A nick change is a network wide thing. Your script is gonna get seriously screwed up if you use the following code:

on *:NICK:#: echo $chan $nick changed nick!

if the nick is on two channels that you are on. A simple $comchan loop can echo the line to the right channels, hardcoding this loop into mIRC seems obsolete to me.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#53558 11/10/03 10:06 AM
Joined: Dec 2002
Posts: 349
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Dec 2002
Posts: 349
I agree, however it won't be 'his' script that screws up, but the many scripts written with the old event in mind. mIRC seems to have a hard-coded list of the number of parameters that each event takes, this is why we can have 'on *:blah:whatever:/this is the alias' and mIRC knows where to begin execution of the script. Changing how many parameters on NICK takes would break every script that uses the event.

This could also cause headaches for people that want to catch the on-nick event for something totally unrelated to a channel, for example:

Code:
on *:nick:*:{ echo -s In case you didnt notice, $nick is now known as $newnick }


How many times would this trigger?

#53559 11/10/03 07:20 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
I'm guessing the original poster was thinking more along the lines of having On NICK and On QUIT trigger once per every channel you and $nick share.

This of course would have a problem of triggering the event multiple times for non-channel related events, so something would have to be added perhaps to identify how the event is going to be used. I'm not saying I support this idea, but this is one way I'd go about it if I were Khaled.

On *:NICK: <-- This triggers once and only once per nick change.

On *:NICK:#: <-- This triggers $comchan($nick,0) times, once for every channel you share.

On *:NICK:#mIRC,#irchelp,#helpdesk: <-- triggers 1 to 3 times, depending on how many of these chans he's on.

So basically, if no # event parameter is present, it works like it currently does. If a # event parameter is present, it triggers for all relative channels and populates the $chan identifier each time around.

The same can be done for QUIT too.
On *:QUIT:#mIRC: <-- Triggers only if $nick is in #mIRC, then populates $chan as necessary.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#53560 12/10/03 12:52 PM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
This was exactly what I had in mind.


* cold edits his posts 24/7

Link Copied to Clipboard