Well, I was looking for a script to do one specefic mode in all channels im op in on all my networks. I ended up with this.
Simply paste it into remotes and type /mass $1 $2, eg; /mass +b Lindrian!@
Just wrote the script, its 4 am, and its sunrise. ^_^
This code can be used for blacklists etc, to massivly add bans etc.
Works with modes [+|-] e I b (Excepts, Invites, Bans)
Edit 07/06/20: Shortened the code down by using $v2.
Enjoy!
alias mass {
var %a = 1
while ($scon(%a)) {
scon %a
; Simply checks all connections
if $regex($1,/^[\+-]?[beI]$/) {
; This if statement checks if you've input a +/- and if your $1 matches beI. If you didnt input +/-,
; It will automaticly chose +.
var %b = 1, %c = $comchan($me,0), %d = $left($1,1), %e = $right($1,1)
while (%b <= %c) {
if ($numtok($2-,32) <= $modespl) {
; This check here is to make sure that $2- isnt longer then $modespl, which means it will not try to set more modes
; Then possible!
if ($me isop $comchan($me,%b)) {
; Here the script makes sure you are OP in the current channel being checked.
mode $v2 $+(%d,$str(%e,$numtok($2-,32))) $2-
; This is the part where the modes are being set. $v2 refers to $comchan($me,%b) [Just to shorten the code down]
}
}
inc %b
}
}
inc %a
}
}
; Here's the code without explenation.
alias mass {
var %a = 1
while ($scon(%a)) {
scon %a
if $regex($1,/^[\+-]?[beI]$/) {
var %b = 1, %c = $comchan($me,0), %d = $left($1,1), %e = $right($1,1)
while (%b <= %c) {
if ($numtok($2-,32) <= $modespl) {
if ($me isop $comchan($me,%b)) {
mode $v2 $+(%d,$str(%e,$numtok($2-,32))) $2-
}
}
inc %b
}
}
inc %a
}
}
; eof
good work, i find this very useful since it has options of more modes to set. i also found your other snippet, the ban lock snippet which i also use. :)
does this also lock the mode set?
maybe it would also nice if you make the same snippet for the invite and exempt (invite and/or exempt lock) as it can very well go with this snippet and would work against those ops who might try to -Ie you or any protected user while you\'re afk.. just a suggestion anyway :)
cool snippet.