simple clone scanner

By sukhbira on Jul 23, 2013

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SIMPLE CLONE SCANNER ||SIMPLE CLONE SCANNER ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*

menu * { 
  [Clone-check]:/cls
} 

alias cls {
  echo 12 [Starting Scan]
  var %x $nick($chan,0),%m,%n 
  while (%x) {
    if ($ialchan($address($nick($chan,%x),2),$chan,0) > 1) && ($istok(%n,$nick($chan,%x),44) == $false) { echo 2 -a [Clones] $nick($chan,%x) has a clone in the room $+([,$cloner($nick($chan,%x),$chan),]) | %n = $addtok(%n,$cloner($nick($chan,%x),$chan),44) | inc %m }
    dec %x
  }
  if (%m) { echo 3 -at [Clones]: %m of $nick($chan,0) }
}
alias cloner {
  var %a $address($1,2),%c $2,%i $ialchan($address($1,2),$2,0),%r
  while (%i) {
    %r = $addtok(%r,$ialchan(%a,%c,%i).nick,44)
    dec %i
  }
  return %r
}

Comments

Sign in to comment.
Savage_CL   -  Aug 09, 2013

I wish you were more descriptive with your variables... This is neither a shortcode competition, nor a speed competition where microseconds may count. Other than that, solid logic. Looks good!

 Respond  
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.