|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
i dont understand
in help file it says for /updatenl
"Usually the channel nicknames list and IAL in a kick/part/quit script event are updated after the script finishes, this command updates them immediately."
but it does not, i have this command executed in clone scan and it doesnt update ial addresses nor nothing
and if i understood correctly it should
so when i join channel with clones, script doesnt find them until users (clones) do some action (like rejoin)
so is this bug or i'm missing something?
Last edited by raZOR; 18/04/06 07:45 PM.
IceCapped
|
|
|
|
Joined: Dec 2004
Posts: 66
Babel fish
|
Babel fish
Joined: Dec 2004
Posts: 66 |
When you join have a script do a /who, that will initialize the IAL for that channel. I’ve never used /updatenl, it seems specifically for use in On *:kick/part/quit: events, not general initialization of the IAL.
|
|
|
|
Joined: Feb 2005
Posts: 681
Fjord artisan
|
Fjord artisan
Joined: Feb 2005
Posts: 681 |
By 'updating the ial and nicklist' he means that the users nick isn't removed from the nicklist and removed from the ial when they quit, part or are kicked from the channel until after the script finishes processing. /updatenl doesn't fill the ial, the IAL is added to one nick/address at a time as they speak or join or some kind of action on the channel, from mirc.hlp...
A user's address is added to the list either when they join the channel, send a message to a channel, or make a mode change.
The only way to fill the IAL when you join a channel is to perform a /who on the channel when you join...
on ME:*:JOIN:#: { $+(.timerWho.,$network,.,#) 1 $chan(0) if ( # ischan) who # }
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
well look at this script: green colored is added by me (additional) and it still dont work altho i use /who $chan
;made by hixxy
;usage /clonescan
alias clones {
[color:green].ial on [/color]
[color:green] .who $chan[/color]
if (!$chan($1).ial) updatenl
var %clones, %i = 1
while ($ialchan($address($2,2),$1,%i).nick) {
if ($v1 != $2) || ($prop == ionick) %clones = %clones $ialchan($address($2,2),$1,%i).nick
inc %i
}
return %clones
}
alias clonescan {
if ($1 == $null) tokenize 32 $chan
var %clones, %clonesdone, %i = 1
echo $color(info) -abfilrt * Scanning for clones...
while ($nick($1,%i)) {
if (!$istok(%clonesdone,$v1,32)) {
%clones = $clones($1,$nick($1,%i))
if (%clones != $null) {
%clonesdone = $addtok(%clonesdone,%clones,32)
echo $color(info) -abfilrt * Clones for $nick($1,%i) $+ : %clones ( $+ $address($nick($1,%i),2) $+ )
}
}
inc %i
}
echo $color(info) -abfilrt * End of scan.
}
IceCapped
|
|
|
|
Joined: Dec 2004
Posts: 66
Babel fish
|
Babel fish
Joined: Dec 2004
Posts: 66 |
I think that use of $chan is only for use in a remote event such as On *:Join:..., and you are using it in aliases. You might call the alias with the name of the channel you want or if you are only going to call the alias with the channel the active mirc window you can use /who $active.
The /who needs to finish initializing the IAL before clonescan is called.
|
|
|
|
Joined: Dec 2004
Posts: 66
Babel fish
|
Babel fish
Joined: Dec 2004
Posts: 66 |
Hmm, I’m too sleepy... I just saw that you are calling the alias clones from a loop in the alias clonescan, and clones always does a /who. You only need to use /who to initialize the IAL when You join a channel. After that mirc will update the IAL as needed as long as you are in the channel. on *:join:#: {
if ($nick == $me) .who $chan
}
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
well if i do that i will get choked since i join over 15 channels at once with god knows how many users :P
whould it be good if i make another alias that first calls /who $active and then /clonescan ?
~edit~ i use this
alias scanclones { .who $active | .timerclones 1 5 .clonescan } and now it does WHO but wont run clonescan :P
Last edited by raZOR; 19/04/06 11:37 AM.
IceCapped
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
That's because $chan doesn't exist as the alias is called from a timer. Try .timerclones 1 5 clonescan $active
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
hellou
alias scanclones { .who $active | .timerclones 1 5 clonescan $active }
on some weird way, it wont even run clonescan :tongue:
IceCapped
|
|
|
|
Joined: Feb 2005
Posts: 681
Fjord artisan
|
Fjord artisan
Joined: Feb 2005
Posts: 681 |
alias scanclones {
.ial on
if ($eval($+(%,clonescan.,$active,.,$cid),2)) return
set -eu[color:red]10[/color] $+(%,clonescan.,$active,.,$cid) $true
who $active
}
raw 352:*:if ($eval($+(%,clonescan.,$2,.,$cid),2)) haltdef
raw 315:*: {
if ((!$eval($+(%,clonescan.,$2,.,$cid),2)) || ($2 !ischan)) return
haltdef
unset $+(%,clonescan.,$2,.,$cid)
clonescan $2
} You may need to raise this, depending on your network lag.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
wow, this works great !
thanks =)
thanks to hixxy for code and mIRCManiac for help =D
IceCapped
|
|
|
|
Joined: Dec 2004
Posts: 66
Babel fish
|
Babel fish
Joined: Dec 2004
Posts: 66 |
I don’t know how you use the clone scan, if you use it more than once without rejoining the channel the IAL is already initialized so you don’t need to do /who the channel again. You can use the “Window Identifiers” version of $chan to see if the IAL contains addresses of all users on the channel. You can add a test to mIRCManiac’s code like this: alias scanclones {
if ($chan($active).ial) clonescan $active
else {
.ial on
if ($eval($+(%,clonescan.,$active,.,$cid),2)) return
set -eu10 $+(%,clonescan.,$active,.,$cid) $true
who $active
}
} I didn’t test the alias. My situation is different, I’m an IRCop on a small server, typically 2 channels and a total of 100ish chatters at one time, so I just /who the whole thing when I join.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
cool, thats nice coz who kinda floods much =) thanks for additional code =D
and yes it works !
IceCapped
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
but then again, does this gets updated after someone joins parts ? in which case /who actually always updates ial
IceCapped
|
|
|
|
Joined: Dec 2004
Posts: 66
Babel fish
|
Babel fish
Joined: Dec 2004
Posts: 66 |
From /help IAL A user's address is added to the list either when they join the channel, send a message to a channel, or make a mode change.
A user's address is removed from the list when they are no longer on any of the channels which you are currently on. So you need the /who to inialize the IAL for people that were in the channel before you and haven't said anything since you got there.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
oh. well i never used this ial stuff so i dont know =) thanks.
IceCapped
|
|
|
|
|