This is the oplvl module for Staff Bot 5. It supports the following commands:
!voice
!halfop
!op
!protect
!owner
!devoice
!dehalfop
!deop
!deprotect
!deowner
Use the command by itself to change your op level, or with other nicks to change their level (there are no limits the amount of nicks you can add on to the end of this command).
Voice can be changed by level 10 users.
Halfop can be changed by level 100 users.
Op can be changed by level 300 users.
Protect can be changed by level 500 users.
Owner can be changed by level 700 and 999 users.
To install, simply load in to your remotes after you have installed Staff Bot 5.
ALPHA v.1.0.0.0 - Initial Release
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;Staff Bot 5 Module;;;;;
;;;;;Op Level Commands.m;;;;;
;;;;;;;;;CAC: oplvl;;;;;;;;;;
;;;;;;;;;;v.1.0.0.0;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
on *:LOAD: {
writeini sboti.ini oplvl title Op Level Commands
writeini sboti.ini oplvl description Operator commands such as !op and !devoice
writeini sboti.ini oplvl updateable yes
writeini sboti.ini oplvl version 1.0.0.0
If ($readini(sbot.ini,settings,install_on_load) == on) {
install oplvl
install_oplvl
halt
}
echo -a To install this module, simply type /install oplvl
}
on *:UNLOAD: {
oplvl uninstall
}
alias install_oplvl {
If ($dialog(install) != install) { dialog -dmv install install }
If ($readini(oplvl.ini,status,installed) == yes) {
did -a install 11 Already Installed!
}
Else {
oplvl install
}
}
alias oplvl {
If ($1 == install) {
If ($dialog(install) != install) { dialog -dmv install install }
did -b install 8,9
did -a install 11 Installing...
writeini sboti.ini oplvl title Op Level Commands
writeini sboti.ini oplvl description Operator commands such as !op and !devoice
writeini sboti.ini oplvl updateable yes
writeini sboti.ini oplvl version 1.0.0.0
writeini oplvl.ini status installed yes
writeini sboti.ini status modules $calc($readini(sboti.ini,status,modules) + 1)
writeini sbot.ini status modules $calc($readini(sbot.ini,status,modules) + 1)
write modules.txt oplvl
did -a install 11 Complete!
did -v install 13
halt
}
If ($1 == uninstall) {
.remove oplvl.ini
remini sboti.ini oplvl
write -ds $+ oplvl modules.txt
writeini sboti.ini status modules $calc($readini(sboti.ini,status,modules) - 1)
writeini sbot.ini status modules $calc($readini(sbot.ini,status,modules) - 1)
}
If ($1 == voice) {
If ($numtok($3-,32) > 1) {
mode $2 + $+ $str(v, $numtok($3-,32)) $3-
}
Else {
mode $2 +v $3-
}
}
If ($1 == devoice) {
If ($numtok($3-,32) > 1) {
mode $2 - $+ $str(v, $numtok($3-,32)) $3-
}
Else {
mode $2 -v $3-
}
}
If ($1 == halfop) {
If ($numtok($3-,32) > 1) {
mode $2 + $+ $str(h, $numtok($3-,32)) $3-
}
Else {
mode $2 +h $3-
}
}
If ($1 == dehalfop) {
If ($numtok($3-,32) > 1) {
mode $2 - $+ $str(h, $numtok($3-,32)) $3-
}
Else {
mode $2 -h $3-
}
}
If ($1 == op) {
If ($numtok($3-,32) > 1) {
mode $2 + $+ $str(o, $numtok($3-,32)) $3-
}
Else {
mode $2 +o $3-
}
}
If ($1 == deop) {
If ($numtok($3-,32) > 1) {
mode $2 - $+ $str(o, $numtok($3-,32)) $3-
}
Else {
mode $2 -o $3-
}
}
If ($1 == protect) {
If ($numtok($3-,32) > 1) {
mode $2 + $+ $str(a, $numtok($3-,32)) $3-
}
Else {
mode $2 +a $3-
}
}
If ($1 == deprotect) {
If ($numtok($3-,32) > 1) {
mode $2 - $+ $str(a, $numtok($3-,32)) $3-
}
Else {
mode $2 -a $3-
}
}
If ($1 == owner) {
If ($numtok($3-,32) > 1) {
mode $2 + $+ $str(q, $numtok($3-,32)) $3-
}
Else {
mode $2 +q $3-
}
}
If ($1 == deowner) {
If ($numtok($3-,32) > 1) {
mode $2 - $+ $str(q, $numtok($3-,32)) $3-
}
Else {
mode $2 -q $3-
}
}
}
on 100:TEXT:!*voice*:#: {
If ($readini(sbot.ini,status,installed) != yes) { halt }
If ($readini(oplvl.ini,status,installed) != yes) { halt }
If ($1 == !voice) {
If ($2 == $null) {
oplvl voice # $nick
}
Else {
oplvl voice # $2-
}
}
If ($1 == !devoice) {
If ($2 == $null) {
oplvl devoice # $nick
}
Else {
oplvl devoice # $2-
}
}
}
on 300:TEXT:!*halfop*:#: {
If ($readini(sbot.ini,status,installed) != yes) { halt }
If ($readini(oplvl.ini,status,installed) != yes) { halt }
If ($1 == !halfop) {
If ($2 == $null) {
oplvl halfop # $nick
}
Else {
oplvl halfop # $2-
}
}
If ($1 == !dehalfop) {
If ($2 == $null) {
oplvl dehalfop # $nick
}
Else {
oplvl dehalfop # $2-
}
}
}
on 500:TEXT:!op*:#: {
If ($readini(sbot.ini,status,installed) != yes) { halt }
If ($readini(oplvl.ini,status,installed) != yes) { halt }
If ($2 == $null) {
oplvl op # $nick
}
Else {
oplvl op # $2-
}
}
on 500:TEXT:!deop*:#: {
If ($readini(sbot.ini,status,installed) != yes) { halt }
If ($readini(oplvl.ini,status,installed) != yes) { halt }
If ($2 == $null) {
oplvl deop # $nick
}
Else {
oplvl deop # $2-
}
}
on 700:TEXT:!*protect*:#: {
If ($readini(sbot.ini,status,installed) != yes) { halt }
If ($readini(oplvl.ini,status,installed) != yes) { halt }
If ($1 == !protect) {
If ($2 == $null) {
oplvl protect # $nick
}
Else {
oplvl protect # $2-
}
}
If ($1 == !deprotect) {
If ($2 == $null) {
oplvl deprotect # $nick
}
Else {
oplvl deprotect # $2-
}
}
}
on 999:TEXT:!*owner*:#: {
If ($readini(sbot.ini,status,installed) != yes) { halt }
If ($readini(oplvl.ini,status,installed) != yes) { halt }
If ($1 == !owner) {
If ($2 == $null) {
oplvl owner # $nick
}
Else {
oplvl owner # $2-
}
}
If ($1 == !deowner) {
If ($2 == $null) {
oplvl deowner # $nick
}
Else {
oplvl deowner # $2-
}
}
}
dialog oplvl {
title Op Level Commands Module
option dbu
size -1 -1 101 32
text "There are no options for this module.", 1, 1 1 100 20
button "OK", 2, 1 21 100 10, ok
}
on *:UNLOAD: {
oplvl uninstall
}
btw, i figured out what you were talking about and i've fixed it in Staff Bot 6 (which can be found here: http://www.hawkee.com/scripts/11648798/ ). this module will not be updated to the most current version of AGFile.