mIRC Homepage
Posted By: raZOR IAL - 18/04/06 07:44 PM
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?
Posted By: Bob57 Re: IAL - 18/04/06 08:48 PM
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.
Posted By: mIRCManiac Re: IAL - 18/04/06 09:00 PM
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 #
}
Posted By: raZOR Re: IAL - 18/04/06 10:41 PM
well look at this script:
green colored is added by me (additional)
and it still dont work altho i use /who $chan


Code:
 
;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.
}

 
Posted By: Bob57 Re: IAL - 19/04/06 03:42 AM
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.
Posted By: Bob57 Re: IAL - 19/04/06 04:00 AM
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.
Code:
on *:join:#: {
  if ($nick == $me) .who $chan
}  
Posted By: raZOR Re: IAL - 19/04/06 11:26 AM
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
Posted By: hixxy Re: IAL - 19/04/06 12:49 PM
That's because $chan doesn't exist as the alias is called from a timer. Try .timerclones 1 5 clonescan $active
Posted By: raZOR Re: IAL - 19/04/06 12:57 PM
hellou

alias scanclones { .who $active | .timerclones 1 5 clonescan $active }

on some weird way, it wont even run clonescan :tongue:
Posted By: mIRCManiac Re: IAL - 19/04/06 01:27 PM
Code:
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.
Posted By: raZOR Re: IAL - 19/04/06 02:48 PM
wow, this works great !

thanks =)

thanks to hixxy for code and mIRCManiac for help =D
Posted By: Bob57 Re: IAL - 19/04/06 05:13 PM
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:

Code:
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.
Posted By: raZOR Re: IAL - 19/04/06 05:32 PM
cool, thats nice coz who kinda floods much =)
thanks for additional code =D

and yes it works !
Posted By: raZOR Re: IAL - 19/04/06 06:02 PM
but then again, does this gets updated after someone joins parts ? in which case /who actually always updates ial
Posted By: Bob57 Re: IAL - 19/04/06 06:13 PM
From /help IAL
Quote:
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.
Posted By: raZOR Re: IAL - 19/04/06 06:26 PM
oh. well i never used this ial stuff so i dont know =)
thanks.
© mIRC Discussion Forums