mIRC Home    About    Download    Register    News    Help

Print Thread
#122307 09/06/05 01:43 AM
Joined: Apr 2005
Posts: 10
C
Crimson Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Apr 2005
Posts: 10
Havnt scripted in awhile, and i forgot how to read the nicknames in a channel on join, not just like the .who command, but how can you check to see if a certain person is in a channel?

#122308 09/06/05 02:05 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
cheap way is to use a timer, becuase you gotta let the nick list full up before checking (i used 5 seconds here u can use less), there is a raw you can catch and check on but it eludes me right now. (im not running mirc)

Code:
on me:*:join:#channel:{ .timer 1 5 check.chan.for.nick $chan NICKYOUWANTTOCHECK }
alias -l check.chan.for.nick {
  if $nick($1,$2) { echo $1 ****************** $2 is in channel ****************** }
}

#122309 09/06/05 02:41 AM
Joined: Apr 2005
Posts: 10
C
Crimson Offline OP
Pikka bird
OP Offline
Pikka bird
C
Joined: Apr 2005
Posts: 10
that works, thx

#122310 09/06/05 01:26 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Just curious, Dave... why not use "if $nick ison $chan" rather than the alias?


Invision Support
#Invision on irc.irchighway.net
#122311 09/06/05 01:30 PM
Joined: Feb 2005
Posts: 681
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Because the server doesn't send the names list until
after you've joined the channel and after the ON JOIN
event is triggered. Also, $nick in this case would be
Crimson or whatever nick he is using, he's looking
for another nick when he joins the channel.

Last edited by mIRCManiac; 09/06/05 01:40 PM.
#122312 09/06/05 01:40 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
D'oh... If I had taken more time to think about it, I'd have noticed that. Thanks. smile


Invision Support
#Invision on irc.irchighway.net
#122313 09/06/05 02:13 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Also my brain was thinking about how you dont get anything in $nick() untell after the list is loaded, so i used that, the alias could have had "if ($2 ison $1) etc etc" without problems i guess, i have no idea if iether is faster.


Link Copied to Clipboard