Advertisement
illpastethat

Clones for popm4n

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