Global BAN

By YmmaX on May 13, 2020

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

;###
;# Global BAN
;# YM] @ 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" } }
 -
}

/load -rs globalban.mrc

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.