mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2003
Posts: 68
Y
yamaz Offline OP
Babel fish
OP Offline
Babel fish
Y
Joined: Oct 2003
Posts: 68
Hi there,
I'd need a simple script with these features:

- notices me if a user with which I have an open query quits (in the very same query window)

- does the same if the user re-logs on (and the query window is still open)

with "notice" I don't mean the actual /notice command, but a simple /echo -a smile

How can I do? Thanks

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Here is a simple version (less accurate when the person connects):
Code:
on *:QUIT:{
  if ($query($nick)) echo $color(quit) -t $nick *** $nick has quit IRC
}
on !*:JOIN:#:{
  if ($query($nick)) echo $color(join) -t $nick *** $nick has joined IRC
}

(untested)


Here is more complex (more accurate) code:
Code:
on *:OPEN:?:*:{ 
  set -u3 $+(%,notify.,$cid,.,$nick) 1
  .notify $nick !query!notify! 
}
on *:CLOSE:?:{
  set -u3 $+(%,notify.,$cid,.,$nick) 1
  .notify -r $nick 
}

on *:NOTIFY:{
  if ($($+(%,notify.,$cid,.,$nick),2)) return
  if ($query($nick)) echo $color(join) -t $nick *** $nick has joined IRC
}

on *:UNOTIFY:{
  if ($($+(%,notify.,$cid,.,$nick),2)) return
  if ($query($nick)) echo $color(quit) -t $nick *** $nick has quit IRC
}

(untested)

-genius_at_work

Joined: Oct 2003
Posts: 68
Y
yamaz Offline OP
Babel fish
OP Offline
Babel fish
Y
Joined: Oct 2003
Posts: 68
Thanks a lot

Yes, I managed to do the same thing as the "simple version", but the problem is that if the guy is on two or more channels where I'm too, the message "xxxxxx has joined IRC" is repeated as many times as the number of the channles.

I look forward to use the simple version fixing this problem... any ideas?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
add the -a switch to the echo command.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
doesnt work with echo dude

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Code:
on !*:JOIN:#:{ if (($query($nick)) && ($comchan($nick,0) == 1)) { echo $color(join) -t $nick *** $nick has joined IRC } }

* code untested *

I checked as someone joined and on the first on join they only had one common channel, so this should cause only one on join to echo anything.

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Since when?
From the mIRC help file
Quote:
-a switch echoes to the currently active window.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I worded that baddly, I ment using a echo -a doesnt work, as hes trying to get it to appear in the query window (as i understand it)


Link Copied to Clipboard