Advertisement
westor

/XACT command for Debian v1.1

Apr 13th, 2023 (edited)
2,293
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.58 KB | None | 1 0
  1. alias xact {
  2.   ; /xact <nick> <#chan> <kick|ban|kb|kickban> [ban-time] [ban-type] [kick-reason]
  3.  
  4.   if ($0 < 3) { echo 4 -gste [/XACT]: Error, Not enough parameters! | return }
  5.   if (!$istok(kick ban kb kickban,$3,32)) { echo 4 -gste [/XACT]: Error, Incorrect action! | return }
  6.   if ($me !ison $2) { echo 4 -gste [/XACT]: Error, You are NOT on $2 channel! | return }
  7.   if ($me !isop $2) { echo 4 -gste [/XACT]: Error, You are NOT a channel operator on $2 channel! | return }
  8.   if ($1 !ison $2) { echo 4 -gste [/XACT]: Error, User $1 is NOT on $2 channel! | return }
  9.   if ($1 !isreg $2) { echo 4 -gste [/XACT]: Error, User $1 is NOT a regular user on $2 channel! | return }
  10.  
  11.   var %host = $ial($1).host
  12.   var %ident = $ial($1).user
  13.  
  14.   if ($4 !== $null) && ($isnum($4)) { var %ban_secs = $4 }
  15.   else { var %secs = 3600 }
  16.  
  17.   if ($5 !== $null) && ($isnum($5)) && ($5 isnum 0-9) { var %type = $5 }
  18.   else { var %type = 4 }
  19.  
  20.   if ($6 == $null) { var %reason = [Banned]: Requested! }
  21.   else { var %reason = $6- }
  22.  
  23.   if ($3 == ban) { var %ban = 1 }
  24.   if ($3 == kick) { var %kick = 1 }
  25.   if ($3 == kb) || ($3 == kickban) { var %ban = 1 | var %kick = 1 }
  26.  
  27.   if (*.irccloud.com iswm %host) || (*.mibbit.com iswm %host) || (*.kiwiirc.com iswm %host) {
  28.     if (%ban) { ban $+(-u,%secs) $2 *! $+ %ident $+ @* }
  29.     if (%kick) { kick $2 $1 %reason }
  30.   }
  31.  
  32.   elseif (*.IP iswm %host) {
  33.     if (%ban) { ban $+(-u,%secs) $2 *!*@*. $+ $gettok(%host,3-,46) }
  34.     if (%kick) { kick $2 $1 %reason }
  35.   }
  36.  
  37.   else {
  38.     if (%ban) { ban $+(-u,%secs) $2 $1 %type }
  39.     if (%kick) { kick $2 $1 %reason }
  40.   }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement