Clones detector

By WorldDMT on May 30, 2009

a clones detector

put the code in your remote and look at the menu you will find WorldDMT Clones Detector V1.0 with status

enable it

menu status,nicklist,menubar {
  -
  WorldDMT Clones Detector V1.0 $iif(%stat.wclone,-[ ON ]-,-[ OFF ]-)
  .$iif(%stat.wclone,Desative,Enable) it:set %stat.wclone $iif(%stat.wclone,0,1)
  -
}
on *:join:#:{
  if $nick == $me {
    set %/who $+ # 1
    who #
  }
  else {
    if %stat.wclone {
      if $ialchan($wildsite,#,0) > 1 {
        echo # 7- clones detected $+($chr(3),4,$chr(91),$chr(3)) $regsubex($str(x,$v1),/x/g,$+($chr(3),14,$ialchan($wildsite,#,\n).nick,$chr(3),$chr(32))) $+($chr(3),4,$chr(93),$chr(3))
      }
    }
  }
}
raw *:*:{
  if (($numeric == 352) && ($($+(%,/who,$2),2))) haltdef
  elseif ($numeric == 315) && ($($+(%,/who,$2),2)) { unset %/who $+ $2 | haltdef }
}

Comments

Sign in to comment.
slub77   -  Apr 10, 2010

I wasn't bored until slub77 started it.

what the hell, don't blame me :O

 Respond  
Jethro   -  Apr 09, 2010

Finally I did it to shorten WordDMT's script to 525 bytes

menu status,nicklist,menubar {
  -
  WorldDMT Clones Detector V1.0 $iif(%stat.wclone,-[ ON ]-,-[ OFF ]-)
  .$iif(%stat.wclone,Dis,En) $+ able it:set %stat.wclone $iif(%stat.wclone,0,1)
  -
}
on *:join:#:{
  if $nick = $me { set %/who $+ # 1 | who # }
  elseif %stat.wclone && $ialchan($wildsite,#,0) > 1 { 
    while ($ialchan($wildsite,#,$0).nick) tokenize 32 $1- $v1 | echo # 7- Clones Detected 4[ $2- 4]
  }
}
raw *:*:{
  if (($numeric = 352) && ($($+(%,/who,$2),2))) haltdef
  elseif ($numeric = 315) && ($($+(%,/who,$2),2)) unset %/who $+ $2 | haltdef
}

I wasn't bored until slub77 started it. lol But thanks for the suggestion, Ford. This time I tried looking at both the inconsistency, redundancy and went for a different route rather than using the regsubex, which cuts many bytes.

 Respond  
WorldDMT   -  Apr 09, 2010

ty ford :)

 Respond  
FordLawnmower   -  Apr 09, 2010

Are you really trying to shorten this Jethro_?
You must be bored :P
Why don't you try eliminating some of the redundancy. You could easily shave 50 bytes this way.
This script is well thought out and written. I don't see any reason to shorten it. Nice code WorldDMT :)

 Respond  
slub77   -  Apr 09, 2010

yea, get a $file().size, to send information,

 Respond  
Jethro   -  Apr 09, 2010

Right, I surrender. lol

That looks like a good website to make a mirc socket out of.

 Respond  
Jethro   -  Apr 08, 2010

:/ but how could it be bigger? The only thing I touched was the equal signs, the removal of two curly brackets, and your menu switch. The rest is the same. :o > == to > =, { and } in your raw events, and this:

.$iif(%stat.wclone,Dis,En) $+ able it:set %stat.wclone $iif(%stat.wclone,0,1)

That's as compact and small as I can go...:p

 Respond  
WorldDMT   -  Apr 08, 2010

@Jethro_: 631 bytes lol :D

 Respond  
slub77   -  Apr 08, 2010

what have i done 0.0

 Respond  
Jethro   -  Apr 07, 2010

How about this one. This has to be a little bit smaller now lol

menu status,nicklist,menubar {
  -
  WorldDMT Clones Detector V1.0 $iif(%stat.wclone,-[ ON ]-,-[ OFF ]-)
  .$iif(%stat.wclone,Dis,En) $+ able it:set %stat.wclone $iif(%stat.wclone,0,1)
  -
}
on *:join:#:{
 if $nick = $me { set %/who $+ # 1 |  who # }
    set %/who $+ # 1
    who #
  }
  else {
    if %stat.wclone {
      if $ialchan($wildsite,#,0) > 1 {
        echo # 7- clones detected $+($chr(3),4,$chr(91),$chr(3)) $regsubex($str(x,$v1),/x/g,$+($chr(3),14,$ialchan($wildsite,#,\n).nick,$chr(3),$chr(32))) $+($chr(3),4,$chr(93),$chr(3))
      }
    }
  }
}
raw *:*:{
  if (($numeric = 352) && ($($+(%,/who,$2),2))) haltdef
  elseif ($numeric = 315) && ($($+(%,/who,$2),2)) unset %/who $+ $2 | haltdef
}
 Respond  
Jethro   -  Apr 07, 2010

Damn...you got me. lol

 Respond  
WorldDMT   -  Apr 07, 2010

@Jethro_: your code is 635 bytes lol :D

 Respond  
Jethro   -  Mar 30, 2010

lol :p Well, if you really want to shrink WorldDMT's script a tiny bit further, you can do this:

menu status,nicklist,menubar {
  -
  WorldDMT Clones Detector V1.0 $iif(%stat.wclone,-[ ON ]-,-[ OFF ]-)
  .$iif(%stat.wclone,Dis,En) $+ able it:set %stat.wclone $iif(%stat.wclone,0,1)
  -
}
on *:join:#:{
  goto $iif($nick = $me,x,y) | :x | set %/who $+ # 1 | who # | halt | :y
  if %stat.wclone && $ialchan($wildsite,#,0) > 1 {
    echo # 7- clones detected $+($chr(3),4,$chr(91),$chr(3)) $regsubex($str(x,$v1),/x/g,$&
      $+($chr(3),14,$ialchan($wildsite,#,\n).nick,$chr(3),$chr(32))) $+($chr(3),4,$chr(93),$chr(3)) | halt
  }
}
raw *:*:{
  if (($numeric = 352) && ($($+(%,/who,$2),2))) haltdef
  elseif ($numeric = 315) && ($($+(%,/who,$2),2)) unset %/who $+ $2 | haltdef
}

I have changed the join event a little, as well as a typo, which to be in French, and made the enable and disable switch a bit smaller. But it's not that much of a difference in size, just a few bytes off. :P

 Respond  
WorldDMT   -  Mar 30, 2010

@worlddmt no i made it a bit smaller
my script is 611 bytes
yours is 622 bytes

so how do you made it smaller? :)

 Respond  
slub77   -  Mar 30, 2010

@worlddmt no i made it a bit smaller

@jethro_ cus i would probably get flammed for making a dialog, then th scripter getting mad cus he did not make one :P

 Respond  
WorldDMT   -  Mar 29, 2010

slub77 you just copy paste??

 Respond  
Jethro   -  Mar 29, 2010

slub77, what did you do to make youself run off!!? How come you did not dialog-ize it? lol

 Respond  
slub77   -  Mar 29, 2010
menu status,nicklist,menubar {
  -
  WorldDMT Clones Detector V1.0 $iif(%stat.wclone,-[ ON ]-,-[ OFF ]-)
  .$iif(%stat.wclone,Desative,Enable) it:set %stat.wclone $iif(%stat.wclone,0,1)
  -
}
on *:join:#:{
  if $nick == $me { set %/who $+ # 1 |  who # }
  else {
    if %stat.wclone {
      if $ialchan($wildsite,#,0) > 1 {
echo # 7- clones detected $+($chr(3),4,$chr(91),$chr(3)) $regsubex($str(x,$v1),/x/g,$+($chr(3),14,$ialchan($wildsite,#,\n).nick,$chr(3),$chr(32))) $+($chr(3),4,$chr(93),$chr(3)) } } } }
raw *:*:{
  if (($numeric == 352) && ($($+(%,/who,$2),2))) haltdef
elseif ($numeric == 315) && ($($+(%,/who,$2),2)) { unset %/who $+ $2 | haltdef } }

Slub77 runs off

 Respond  
eyiezinc   -  May 31, 2009

nice little snippet!congrate WorldDMT

 Respond  
WorldDMT   -  May 31, 2009

ah ok nooo i saw the color nomber i was think u saw it like this or not colored :p

 Respond  
Cheiron   -  May 31, 2009

it did work WorldDMT for me. you might have just misread what i typed in my comment :)

 Respond  
WorldDMT   -  May 31, 2009

hi tnx for your comments

@Cheiron: echo work good with me, i dont now why that dont work with u :/

@tv3636: tnx i changed it :D

 Respond  
Weasel   -  May 30, 2009

good script, might allow clones for ops?

9-10 would be 10, but don't like the menu feature. -.-

 Respond  
Aucun50   -  May 30, 2009

Small but does the job very good, nice work.

 Respond  
tv3636   -  May 30, 2009

hi

WordlDMT Clones Detector V1.0 $iif(%stat.wclone,-[ ON ]-,-[ OFF ]-)

This should be

WorldDMT Clones Detector V1.0 $iif(%stat.wclone,-[ ON ]-,-[ OFF ]-)

:p Looks good though, although I have no use for it personally

 Respond  
Cheiron   -  May 30, 2009

[14:49:48] * Joins: Shiras_RPOAKbot 7- clones detected 4[ 14Shiras_RPOAKbot 14Titan_Bot 4]

nice little echo in channel. very basic echo and non obtrusive. job well done :) gets an 8 and a like

 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.