rendered paste bodyalias checkuser {
if ($eval($+(%,accesso.,$address($1-,2),.,$chan),2) == 1) {
return $true }
else {
return $false }
}
alias checkuser2 {
if ($eval($+(%,accessv.,$address($1-,2),.,$chan),2) == 1) {
return $true }
else {
return $false }
}
on *:TEXT:access*:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
if (!$2) {
if ($checkuser($nick) == $true) { notice $nick $2 has access 200 in #mouse. }
elseif ($checkuser2($nick) == $true) { notice $nick $2 has access 100 in #mouse. }
else { notice $nick $2 lacks access to #mouse. }
}
else {
if ($checkuser($2) == $true) { notice $nick $2 has access 200 in #mouse. }
elseif ($checkuser2($2) == $true) { notice $nick $2 has access 100 in #mouse. }
else { notice $nick $2 lacks access to #mouse. }
}
}
}
on *:JOIN:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
if ($checkuser($nick) == $true) {
mode $chan +o $nick
}
elseif ($checkuser2($nick) == $true) {
mode $chan +v $nick
}
}
}
on *:TEXT:addop *:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
if ($eval($+(%,$address($nick,2),.,$chan,.admin),2) == 1) {
set %fixed $replace($2-,[,$chr(91),],$chr(93),(,$chr(40),),$chr(41),|,$chr(124),^,$chr(94))
set $(% $+ accesso. $+ $address(%fixed,2) $+ . $+ $chan) 1
notice $nick $+ $2 $+ has been added.
mode $chan +o $2
}
}
}
on *:TEXT:addvoice *:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
if ($eval($+(%,$address($nick,2),.,$chan,.admin),2) == 1) {
set %fixed $replace($2-,[,$chr(91),],$chr(93),(,$chr(40),),$chr(41),|,$chr(124),^,$chr(94))
set $(% $+ accessv. $+ $address(%fixed,2) $+ . $+ $chan) 1
notice $nick $+ $2 $+ has been added.
mode $chan +v $2
}
}
}
on *:TEXT:addadmin *:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
if ($address($nick,2) == %headadmin || $address($nick,2) == %headadmin $+ . $+ $chan) {
set $(% $+ $address($2,2) $+ . $+ $chan $+ . $+ admin) 1
notice $nick $+ $2 $+ has been added.
}
}
}
on *:TEXT:addhadmin *:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
if ($address($nick,2) == %headadmin) {
set $+(%headadmin,.,$chan) $address($nick,2)
notice $nick $+ $2 $+ has been added.
}
}
}
on *:TEXT:remhadmin *:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
if ($address($nick,2) == %headadmin) {
unset $+(%headadmin,.,$chan) $address($nick,2)
notice $nick $+ $2 $+ has been removed.
}
}
}
on *:TEXT:remop *:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
if ($eval($+(%,$address($nick,2),.,$chan,.admin),2) == 1) {
set %fixed $replace($2-,[,$chr(91),],$chr(93),(,$chr(40),),$chr(41),|,$chr(124),^,$chr(94))
unset $(% $+ accesso. $+ $address(%fixed,2) $+ . $+ $chan)
notice $nick $+ $2 $+ has been removed.
mode $chan -o $2
}
}
}
on *:TEXT:remvoice *:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
if ($eval($+(%,$address($nick,2),.,$chan,.admin),2) == 1) {
set %fixed $replace($2-,[,$chr(91),],$chr(93),(,$chr(40),),$chr(41),|,$chr(124),^,$chr(94))
unset $(% $+ accessv. $+ $address(%fixed,2) $+ . $+ $chan)
notice $nick $+ $2 $+ has been removed.
mode $chan -v $2
}
}
}
on *:TEXT:remadmin *:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
if ($address($nick,2) == %headadmin) {
unset $(% $+ $address($2,2) $+ . $+ $chan $+ . $+ admin)
notice $nick $+ $2 $+ has been removed.
}
}
}
on *:TEXT:register:#: {
if ($address($nick,2) == %headadmin) {
set $(% $+ $chan $+ . $+ registered) 1
notice $nick $+ $chan $+ has been registered.
}
}
on *:TEXT:up:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
if ($checkuser($nick) == $true) {
mode $chan +o $nick
}
elseif ($checkuser2($nick) == $true) {
mode $chan +v $nick
}
}
}
on *:TEXT:down:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
mode $chan -o $nick
mode $chan -v $nick
}
}
on *:TEXT:op *:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
if ($eval($+(%,$address($nick,2),.,$chan,.admin),2) == 1) {
mode $chan +o $2
notice $nick $+ $2 $+ has been oped.
}
}
}
on *:TEXT:deop *:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
if ($eval($+(%,$address($nick,2),.,$chan,.admin),2) == 1) {
mode $chan -o $2
notice $nick $+ $2 $+ has been deoped.
}
}
}
on *:TEXT:voice *:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
if ($eval($+(%,$address($nick,2),.,$chan,.admin),2) == 1) {
mode $chan +v $2
notice $nick $+ $2 $+ has been voiced.
}
}
}
on *:TEXT:devoice *:#: {
if ($eval($+(%,$chan,.registered),2) == 1) {
if ($eval($+(%,$address($nick,2),.,$chan,.admin),2) == 1) {
mode $chan -v $2
notice $nick $+ $2 $+ has been devoiced.
}
}
}
on *:TEXT:.com*:#mouse:{
if ($nick isop $chan) { notice $nick commands : access addop addvoice addadmin addhadmin remhadmin remop remvoice remadmin register up down op deop voice devoice }