Skip to content
MSN Addons

Clone Detector

A TG007 community discussion started by Rudeboy.

Discussion 4 posts
Page 1 of 1
Open
Topic #1925 · 4 published posts · 785 views

trying to build a clone detector bu having problem with one part of code

 if $read(Textfiles/nickhistory.txt, w, * $+ $nick $+ *) { set %clone $readn }
 if ($xd($nick) == $gettok($read(textfiles/nickhistory.txt,%clone),2,32)) &&  ($$ial($xd($nick) $+ *,1).addr != $gettok($read(textfiles/nickhistory.txt,%clone),1,32)) {  
   write -l %line textfiles/nickhistory.txt $$ial($nick $+ *,1).addr Cloner $asctime(h:nn:ss tt) $adate $chan $xd($nick)
   kick # $nick No Cloning Allowed (Infinite Ban)
   access # add deny $$ial($nick $+ *,1).addr
   return
 }

problem is though say you have someone with the nick mary who is on line # 8 of the text file.

now you also have someone on line 15 who is nicked ma

if someone clones ma it wont catch it because it stops at line 8 when it matches ma to mary. how can i get it to where if the nick doesnt match exactly it will keep going?

when you record your listing, you should put the nickname first, then the address, so you can use $read(Textfiles/nickhistory.txt, s, $nick $+ $chr(32)) which basically searches the database for the anything begining with. Personally i wouldn't use $chr(32) but i would use something like $chr(9) only because the computer wont do a tab stop by mistake, but it could do a space by mistake. So yea, thats the best way around this little problem.

had thought of that however didnt want to have to make yet another text file. Trying to use the one i already have for my nickchange detect which goes by gate so thats why its in that order

if $read(Textfiles/nickhistory.txt, w, * $+ $nick $+ *) { set

Change that to:

if $read(Textfiles/nickhistory.txt, w, * $+ $nick $+ *) && ($nick != $read(Textfiles/nickhistory.txt,w, $+ $nick $+ ) { set