Skip to content
MSN

Clone Detect +

A TG007 community discussion started by Gwen.

Discussion 5 posts
Page 1 of 1
Open
Topic #6421 · 5 published posts · 813 views

I am having great difficulty writing a script that will show the last 3-4 nicknames that a user has come into a room under.

 

Does anyone have a code for this that I could use??

 

Thanks,

Gwen

;by eXonyte
#NickDetect on
on *:JOIN:#: exoclonecheck $nick $address $chan
raw knock:*: exoclonecheck $nick $address $1

alias exoclonecheck {
if ($1 != $me) {
;If you want it to store more or less nicknames,
;change this number below to the number you want to store.
var %n 20
;change the 5 to the number of clones you want to detect
var %x $read($scriptdir $+ exoclonecheck.dat,sn,$2)
if (%x == $null) write $+(",$scriptdir,exoclonecheck.dat") $2 $1
else {
%x = $addtok(%x,$1,32)
if ($numtok(%x,32) > %n) %x = $deltok(%x,1,32)
write -l $+ $readn $+(",$scriptdir,exoclonecheck.dat") $2 %x
}
if ($numtok(%x,32) > 1) amsg $ecc.decode($1 $+ 's last $numtok(%x,32) names: $replace(%x,$chr(32),$chr(44) $+ $chr(32)))
elseif ((%x != $1) && (%x)) amsg $ecc.decode($1 $+ 's last name: %x)
}
}

alias ecc.decode {
if ($msn.vver) return $msn.ifdecode($1-)
else return $1-
}
#NickDetect end

there's one made by Rumbar aswell

Rumbars History Addon

 

vsixc.ath.cx 6667

Try this one

menu nicklist {
 $iif($1,Clone Logger)
 .User(s)
 ..$submenu($cx($1))
 .Options
 ..Status
 ...$cst(on):.enable #c
 ...$cst(off):.disable #c
 ..Notify
 ...$iif(%cnotify = echo, $style(1) echo,echo):set %cnotify echo
 ...$iif(%cnotify = msg, $style(1) msg,msg):set %cnotify msg
 ..Max last nicks $chr(91) $+ $iif(%cmaxlog,$ifmatch,3) $+ $chr(93):
 ...set max:set %cmaxlog $$?="Maximum number of last nicks to log:"
 .Add to log
 ..add selected:$ct($snicks).writeini
 ..add room:$ct($replace($remove($dde($ddename,users,$active),$active $+ $chr(32),.,@,+),$chr(32),$chr(44))).writeini
 .Del from log
 ..del selected:$ct($snicks).remini
 ..del room:$ct($replace($remove($dde($ddename,users,$active),$active $+ $chr(32),.,@,+),$chr(32),$chr(44))).remini
}
alias cst return $iif($1 = $group(#c), $style(1) $+ $1, $1)
alias cx {
 if ($1 <= $snick($active,0)) return $snick($active,$1) $+ :.ctx $1
 else return
}
alias ctx {
 var %n = $snick($active,$1), %x = $readini(c.txt,c,$ial(%n).user), %y = $numtok(%x,44)
 if (%x) echo -a $+($chr(3),05) $+ %n $+ 's last $iif(%y > 1, $calc(%y -1) nicks,nick) ( $+ $iif(%y > 1,$remtok(%x,%n,44),%x) $+ )
 else echo -a $+($chr(3),05) $+ %n not in log
}
alias ct {
 tokenize 44 $iif($findtok($1,$mnick,44), $deltok($1,$ifmatch,44), $1)
 var %x = 1, %y = ""
 while (%x <= $0) {
   %y = $($+($chr(36),%x),2)
   if ($ial(%y).user) {
     if ($readini(c.txt,c,$ial(%y).user)) && ($prop = remini) $ifmatch -n c.txt c $ial(%y).user %y
     if (!$readini(c.txt,c,$ial(%y).user)) && ($prop = writeini) $ifmatch -n c.txt c $ial(%y).user %y
   }
   inc %x
 }
}
#c on
on *:join:#:{
 inc -u3 %jfld [ $+ [ # ] ]
 if (%jfld [ $+ [ # ] ] < 3) && ($left($nick,1) != >) && ($nick != $mnick) {
   var %feed = "", %ftok = "", %ftype = $iif(%cnotify = msg,msg,echo), %fmax = $calc($iif(%cmaxlog,$ifmatch,3)+1)
   if ($readini(c.txt,c,$ial($nick).user)) {
     %feed = $ifmatch
     %ftok = $numtok(%feed,44)
     if (!$findtok(%feed,$nick,44)) {
       if (%ftok = $calc(%fmax -1)) %feed = $gettok($instok(%feed,$nick,%fmax,44),$+(2-,%fmax),44)
       elseif (%ftok > 1) %feed = $gettok($instok(%feed,$nick,$calc(%ftok +1),44),$+(1-,$calc(%fmax -1)),44)
       else %feed = $+(%feed,$chr(44),$nick)
       writeini -n c.txt c $ial($nick).user %feed
       %ftok = $numtok(%feed,44)
     }
     if (%ftok = 1) return
     if (%ftok = 2) %ftok = 1
     %ftype # $+($chr(3),05) $+ $nick $+ 's $iif(%ftok = 1, other nick was ,last $calc(%ftok -1) nicks were) ( $+ $remtok(%feed,$nick,44) $+ )
   }
   else {
     %feed = $nick
     writeini -n c.txt c $ial($nick).user %feed
     %ftype # $+($chr(3),05) $+ New logged user ( $+ %feed $+ )
     return
   }
 }
}
#c end

Thanks everyone :-)

 

X-Fusion I went with the code you posted--it works great. The only thing I have to fix on it is the 'del room' and 'del selected'--neither of those delete info from c.txt --though the add option works correctly.

 

Gwen