westor

Kick clones for Alone v1.5

Nov 15th, 2021 (edited)
931
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.12 KB | None | 0 0
  1. ON @*:TEXT:*:#: {
  2.   tokenize 32 $strip($1-)
  3.  
  4.   if ($1 == .dr) {
  5.     if ($network !== DaVang) || (!$read(userbot.txt,nw,$nick)) || ($nick isreg #userbot) { return }
  6.     if (!$2) && ($2 !== $me) && ($2 !== $nick) && ($2 !ison $chan) && ($2 !isreg $chan) { return }
  7.  
  8.     var %id = $rands(A,Z) $+ $rands(A,Z) $+ $rands(10000,99999)
  9.     var %reason = $read(atb_dronereason.txt,nt)
  10.  
  11.     var %h = $ial($2).host
  12.     var %u = $ial($2).user
  13.     var %t = $ial(*@ $+ %h,0)
  14.  
  15.     if (%t == 1) { kick_clones $2 $chan $remove(%u,~) %h %id %reason | return }
  16.  
  17.     var %i = 1
  18.     while (%i <= %t) {
  19.       var %n = $ial(*@ $+ %h,%i).nick
  20.       var %a = $ial(*@ $+ %h,%i).host
  21.  
  22.       if (%h == %a) { var %tot = $addtok(%tot,%n,32) }
  23.  
  24.       inc %i
  25.     }
  26.  
  27.     if (!%tot) { return }
  28.  
  29.     var %z = 1
  30.     while (%z <= $numtok(%tot,32)) {
  31.       var %n_name = $gettok(%tot,%z,32)
  32.       var %n_host = $ial(%n_name).host
  33.       var %n_ident = $ial(%n_name).user
  34.  
  35.       kick_clones %n_name $chan $remove(%n_ident,~) %n_host %id %reason
  36.  
  37.       inc %z
  38.     }
  39.   }
  40. }
  41.  
  42. alias -l kick_clones {
  43.   ; /kick_clones <nickname> <#channel> <ident> <host> <ID> <reason>
  44.  
  45.   if (!$1) || (!$2) || (!$3) || (!$4) || (!$5) || (!$6) { return }
  46.  
  47.   var %txt_db = atb_dronedatabase.txt
  48.  
  49.   if (*irccloud* iswm $4) {
  50.     mode $2 +b *! $+ $3 $+ @*
  51.  
  52.     kick $2 $1 4([Banned] (reason: $6- $+ ) $chr(91) $+ ID: $5 $+ $chr(93) - (for more information regarding your ban please contact nickname Kendy for removal))
  53.  
  54.     var %r = $read(%txt_db,nw,* $+ $5 $+ *)
  55.  
  56.     if (!%r) { write $qt(%txt_db) $+([ID:,$chr(32),$5,],$chr(59),*!,$3,@*) | .notice $1 Added $+  *! $+ $3 $+ @*  $+ to %txt_db successfull. }
  57.  
  58.     .timer[UNBAN_ $+ $2 $+ _ $+ $3 $+ _IDENT] 1 3600 mode $2 -b *! $+ $3 $+ @*
  59.   }
  60.   else {
  61.     ban -ku3600 $2 $1 2 4([Banned] (reason: $6- $+ ) $chr(91) $+ ID: $5 $+ $chr(93) - (for more information regarding your ban please contact nickname Kendy for removal))
  62.  
  63.     var %r = $read(%txt_db,nw,* $+ $5 $+ *)
  64.  
  65.     if (!%r) { write $qt(%txt_db) $+([ID:,$chr(32),$5,],$chr(59),*!*@,$4) | .notice $1 Added $+  *!*@ $+ $4  $+ to %txt_db successfull. }
  66.   }
  67. }
Add Comment
Please, Sign In to add comment