Advertisement
illpastethat

Clones Script

Feb 16th, 2012
913
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.46 KB | None | 0 0
  1. ;Clones Scripts
  2. ;Made by nick1
  3. ;Last edit February 16, 2012
  4.  
  5. on *:join:#: {
  6.   if ($nick != $me) {
  7.     if (($me isop $chan) || ($me isowner $chan) || ($me ishop $chan) || ($me isprotect $chan)) {
  8.       clones
  9.     }
  10.   }
  11. }
  12. alias f6 {
  13.   ;kick
  14.   var %i 0
  15.   while (%i < $numtok(%clone.nicks,44)) {
  16.     inc %i
  17.     kick %clone.chan $gettok(%clone.nicks,%i,44) Double/Clone of %clone.address $+([,%clone.nicks,])
  18.   }
  19. }
  20. alias f7 {
  21.   mode %clone.chan +b %clone.address
  22.   var %i 0
  23.   while (%i < $numtok(%clone.nicks,44)) {
  24.     inc %i
  25.     kick %clone.chan $gettok(%clone.nicks,%i,44) Double/Clone of %clone.address $+([,%clone.nicks,])
  26.   }
  27. }
  28. alias f8 {
  29.   ;kickban with time
  30.   mode %clone.chan +b %clone.address
  31.   var %time $?="How many seconds until they are unbanned? 30 mins = 1800 1 hour = 3600 etc."
  32.   if (%time !isnum) {
  33.     echo -ac info Invalid Input -- Halting
  34.     halt
  35.   }
  36.   var %i 0
  37.   while (%i < $numtok(%clone.nicks,44)) {
  38.     inc %i
  39.     kick %clone.chan $gettok(%clone.nicks,%i,44) Double/Clone of %clone.address $+([,%clone.nicks,]) -- Temporary Ban unbanned in $duration(%time)
  40.   }
  41.   .timerunban $+ %clone.address 1 %time mode %clone.chan -b %clone.address
  42. }
  43. alias Clones {
  44.   var %x $nick($chan,0),%m,%n
  45.   while (%x) {
  46.     if ($ialchan($address($nick($chan,%x),2),$chan,0) > 1) && ($istok(%n,$nick($chan,%x),44) == $false) {
  47.       if (!$istok($ignoreclone,$address($nick($chan,%x),2),44)) {
  48.         echo 4 -at [Clone] - $address($nick($chan,%x),2) has a clone in $chan $+([,$cloner($nick($chan,%x),$chan),])
  49.         set %clone.address $address($nick($chan,%x),2)
  50.         set %clone.nicks $cloner($nick($chan,%x),$chan)
  51.         set %clone.chan $chan
  52.       }
  53.       %n = $addtok(%n,$cloner($nick($chan,%x),$chan),44)
  54.       inc %m
  55.     }
  56.     dec %x
  57.   }
  58. }
  59.  
  60. alias cloner {
  61.   var %a $address($1,2),%c $2,%i $ialchan($address($1,2),$2,0),%r
  62.   while (%i) {
  63.     %r = $addtok(%r,$ialchan(%a,%c,%i).nick,44)
  64.     dec %i
  65.   }
  66.   return %r
  67. }
  68.  
  69. alias ignoreclone {
  70.   return %clonesignore
  71. }
  72.  
  73. on *:input:*: {
  74.   if ($1 == !ignoreclone) {
  75.     if (*!*@* iswm $2) {
  76.       set %clonesignore $addtok(%clonesignore,$2,44)
  77.       echo -act info Ignoring the host $qt($2) for clone search
  78.     }
  79.     elseif ($nick($active,$2)) {
  80.       set %clonesignore $addtok(%clonesignore,$address($2,2),44)
  81.       echo -act info Ignoring the host $qt($address($2,2)) for clone search
  82.     }
  83.     else {
  84.       echo -act info Invalid Syntax: !ignoreclone <nick|host>
  85.     }
  86.   }
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement