Simple clone scanner

By ^silk on Nov 05, 2007

Simple dialog that provides a list of channels in a drop-down combo box. Select one of those channels and it will scan for the clones. /clonescanner to open.

/*
Simple dialog that provides a list of channels in a drop-down combo box. Select one of those channels and it will scan for the clones. /clonescanner to open. 
*/

alias clonescanner dialog $iif($dialog(clones),-v,-m) clones clones
dialog clones {
  title "Clone scanner"
  size -1 -1 183 158
  option pixels
  combo 1, 4 3 175 27, drop
  list 2, 4 34 171 113, size sort 
}

on *:dialog:clones:init:0:{ 
  var %x = 1
  while ($chan(%x)) {  
    did -a $dname 1 $v1
    inc %x
  }
}

on *:dialog:clones:sclick:1:{ 
  var %p = 1 
  while (%p <= $nick($did($dname,1).seltext,0)) { 
    if ($ialchan($address($nick($did($dname,1).seltext,%p),2),$did($dname,1).seltext,0).nick > 1) { 
      var %n = $nick($did($dname,1).seltext,%p) 
      did -a $dname 2 $+(%n,:) $detectclone(%n)
    }
    inc %p
  }
}

alias -l detectclone { 
  var %x = 1 
  while (%x <= $ialchan($address($1,2),$did(clones,1).seltext,0)) { 
    var %z = %z $ialchan($address($1,2),$did(clones,1).seltext,%x).nick
    inc %x
  }
  return %z
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.