Add peon/ops
Posted by BotMaN^
Sunday, April 06, 2008
Description: This script is good for bots on TEXT .addop <nick> | .addpeon <nick> :D
on :LOAD:{ msg #channelhere Access Script Loaded }
on :UNLOAD:{ msg #channelhere Access Script unloaded }
on *:TEXT:[trigger-here]addpeon *:#all-stars:{
if ($ulevel == 500) {
guser -a 100 $3 2
notice $3 You have been added as [^B]PEON[^B] access.
mode # +v $3
}
}
on *:TEXT:[trigger-here]addop *:#all-stars:{
if ($ulevel == 500) {
guser -a 200 $3 2
notice $3 You have been added as [^B]OP[^B] access.
mode # +o $3
}
}
on *:JOIN:#all-stars:{
if ($ulevel == 100) { mode #all-stars +v $nick }
if ($ulevel == 200) { mode #all-stars +o $nick }
}
on *:TEXT:[trigger-here]deluser *:#all-stars:{
if ($ulevel == 500) {
ruser $3 2
notice $nick User $3 has been deleted from userlist.
}
}
on *:TEXT:.save*:#all-stars:{
if ($2 == ops) { set %access 200 }
else if ($2 == peons) { set %access 100 }
else { notice $nick Wrong parameter. }
/write -c owners.txt
set %h 1
notice $nick Saving users with access %access $+ . Please wait ...
:nexthost
set %host $ulist(*,%access,%h)
if (%host == $null) goto donehost
/write access $+ %access $+ .txt %host
inc %h
goto nexthost
:donehost
notice $nick Done.
}
}
on :LOAD:{ msg #channelhere Access Script Loaded }
on :UNLOAD:{ msg #channelhere Access Script unloaded }
on *:TEXT:[trigger-here]addpeon *:#all-stars:{
if ($ulevel == 500) {
guser -a 100 $3 2
notice $3 You have been added as [^B]PEON[^B] access.
mode # +v $3
}
}
on *:TEXT:[trigger-here]addop *:#all-stars:{
if ($ulevel == 500) {
guser -a 200 $3 2
notice $3 You have been added as [^B]OP[^B] access.
mode # +o $3
}
}
on *:JOIN:#all-stars:{
if ($ulevel == 100) { mode #all-stars +v $nick }
if ($ulevel == 200) { mode #all-stars +o $nick }
}
on *:TEXT:[trigger-here]deluser *:#all-stars:{
if ($ulevel == 500) {
ruser $3 2
notice $nick User $3 has been deleted from userlist.
}
}
on *:TEXT:.save*:#all-stars:{
if ($2 == ops) { set %access 200 }
else if ($2 == peons) { set %access 100 }
else { notice $nick Wrong parameter. }
/write -c owners.txt
set %h 1
notice $nick Saving users with access %access $+ . Please wait ...
:nexthost
set %host $ulist(*,%access,%h)
if (%host == $null) goto donehost
/write access $+ %access $+ .txt %host
inc %h
goto nexthost
:donehost
notice $nick Done.
}
}