I just want a mass op script, rest I can make it self, based on the mass op script.
I have edited my code now to include the half op and voice
usage is simply !mass and theword:
op, deop, hop, dehop, voice or devoice
like !mass op or !mass devoice
the
on @*:text:!mass *:#channel:{
if ($nick isop $chan) { multimode $$2 $chan $nick }
if ($nick !isop $chan) { msg $chan $nick You do not have authorization. }
}
alias Multimode {
var %channel = $2
var %nick = $3
if ($1 == deop) {
var %prefix = -
var %mode = o
}
if ($1 == op) {
var %prefix = +
var %mode = o
}
if ($1 == dehop) {
var %prefix = -
var %mode = h
}
if ($1 == hop) {
var %prefix = +
var %mode = h
}
if ($1 == devoice) {
var %prefix = -
var %mode = v
}
if ($1 == voice) {
var %prefix = +
var %mode = v
}
var %all.nicks = $nick(%channel,0), %i = 1
while (%i <= %all.nicks) {
var %nic = $nick(%channel,%i)
sline %channel %nic
inc %i
}
sline -r %channel $me
sline -r %channel %nick
var %modecnt = $modespl
var %modelst = $snick(%channel)
var %modenum = $gettok(%modelst,0,44)
var %i = 1
var %x = 1
while (%i <= %modenum) {
var %listnk = %listnk $gettok(%modelst,%x,44)
var %lenchk = $gettok(%listnk,0,32)
if (%lenchk >= %modecnt) {
mode %channel %prefix $+ $str(%mode,$modespl) %listnk
var %listnk = ""
}
if (%i == %modenum) {
mode %channel %prefix $+ $str(%mode,$modespl) %listnk
var %listnk = ""
}
inc %i
inc %x
}
}
Some comments on this part of the script
on @*:text:!mass *:#channel:{
you should have an access level on the bot to restrict this to either yourself or you and whatever others
If that level were "1000" the line would be
on @1000:text:!mass *:#channel:{
and then the isop check would not be needed, simply send the info to the alias.
on @1000:text:!mass *:#channel:{
multimode $$2 $chan $nick
}