Skip to content
TG007 community snippet #122

Global Ban by YmmaX

BAN a user in all common channel/s, with/out X. Syntax: /globalban /xglobalban

By Snippets Added Dec 4, 2023
General IRC All snippets
mIRC script 52 lines
About this snippet

Overview

BAN a user in all common channel/s, with/out X.
Syntax:
/globalban
/xglobalban
Source code

mIRC script

52 lines · 1,281 characters
;###
;# Global BAN
;# yM]x @ UnderNet
;###

/globalban {
.set %gkbcchans $comchan($1,0)
.set %gkb 1
 :start
  if (%gkb > %gkbcchans) { goto stop }
  if (%gkb <= %gkbcchans) {
    if ($me isop $comchan($1,%gkb)) && ($1 ison $comchan($1,%gkb)) {
      if ($1 isop $comchan($1,%gkb)) { /mode $comchan($1,%gkb) -o $1 }
      /mode $comchan($1,%gkb) +b $address($1,2)
      /.timer 1 1 /kick $comchan($1,%gkb) $1 $2-
      inc %gkb | goto start
    }
    if ($me !isop $comchan($1,%gkb)) || ($1 !ison $comchan($1,%gkb)) {
      inc %gkb | goto start
    }
  }
 :stop
  .unset %gkb*
}
/xglobalban {
.set %gkbcchans $comchan($1,0)
.set %gkb 1
 :start
  if (%gkb > %gkbcchans) { goto stop }
  if (%gkb <= %gkbcchans) {
    if (X isop $comchan($1,%gkb)) {
      /.cprivmsg x %servchan ban $comchan($1,%gkb) $address($1,2) $2 75 $3-
      inc %gkb | goto start
    }
    if (X !ison $comchan($1,%gkb)) {
      inc %gkb | goto start
    }
  }
 :stop
  .unset %gkb*
}

alias cF4 /globalban $1 $$?="BAN Reason"
alias sF4 /xglobalban $1 $$?="Duration" $$?="BAN Reason"

menu nicklist {
 -
 Global BAN
 .Mode:{ if ($1 != $null) { /globalban $1 $$?="BAN Reason" } }
 .X:{ if ($1 != $null) { /xglobalban $1 $$?="Duration" $$?="BAN Reason" } }
 -
}
Community

Comments

Want to join the discussion? Sign in to TG007.
No comments yet. Start the discussion.