on *:text:!allow*:#:{
if $nick !isop $chan {
.notice $nick Insufficient access. Ops status required
}
elseif !$2 {
.notice $nick Insufficient parameters. One or more nicks required
}
else {
var %nicks = $replace($2-,$chr(44),$chr(32))
var %a = 1, %b = $numtok(%nicks,32)
while %a <= %b {
.hadd -m Allowed $gettok(%nicks,%a,32) $addtok($hget(Allowed,$gettok(%nicks,%a,32)),$chan,32)
inc %a
}
}
}
on @*:text:!invite*:#:{
if !$2 {
.notice $nick Insufficient parameters. One or more nicks required
}
else {
var %nicks = $replace($2-,$chr(44),$chr(32))
var %a = 1, %b = $numtok(%nicks,32)
while %a <= %b {
if $istok($hget(Allowed,$gettok(%nicks,%a,32)),$chan,32) {
invite $gettok(%nicks,%a,32) $chan
}
inc %a
}
}
}
on *:text:!disallow*:#:{
if $nick !isop $chan {
.notice $nick Insufficient access. Ops status required
}
elseif !$2 {
.notice $nick Insufficient parameters. One or more nicks required
}
else {
var %nicks = $replace($2-,$chr(44),$chr(32))
var %a = 1, %b = $numtok(%nicks,32)
while %a <= %b {
.hadd -m Allowed $gettok(%nicks,%a,32) $remtok($hget(Allowed,$gettok(%nicks,%a,32)),$chan,1,32)
inc %a
}
}
}
on *:start:{
if !$hget(Allowed) { .hmake Allowed 100 }
if $exists(Allowed.hsh) { .hload Allowed Allowed.hsh }
}
on *:exit:{
.hsave -o Allowed Allowed.hsh
}
on *:disconnect:{
.hsave -o Allowed Allowed.hsh
}