Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:text:!say*:*: {
- ;if ($readini(access.ini,users,$nick)) {
- if ($2 == part) {
- if ($3 == $null) { /part $chan }
- else { /part $3 }
- }
- else if ($2 == logina) { /nick AndyD | /ns id ***}
- else if ($2 == logins) { /nick Spartain | /ns id ***}
- else if ($2 == loginb) { /nick [Lt]Caller | /ns id ***}
- else if ($2 == /j) || ($2 == join) || ($2 == /join) { /j $3 }
- else if ($2 == channel) { /msg $3 14[Message from $nick $+ ] $+ $4- }
- else if ($2 == rank) {
- set %done = false
- set %rank $4
- set %test.access True
- set %test.nick1 $nick
- set %test.nick2 $3
- set %test.nick $nick
- set %test.chan $chan
- set %try 0
- /cs access $chan list
- /echo Variables set, reading Access list (var1 = %read3 var2 = %read5 $+ )
- /timer 1 2 /cs Wait
- }
- else { /msg $chan $2- }
- }
- on *:notice:*:*: {
- /set %read6 $1-
- if (%test.access == True) {
- if (Denied isin %read6) { /msg %test.channel The bot does not have the access level required to rank people, you need to find another means. | goto unset }
- /set %read $2-
- if (%test.nick1 isin %read) {
- /set %read2 %read
- /set %read3 $remove( %read2, %test.nick1 )
- if (%read3 isnum) /msg %test.chan %test.nick1 $+ 's access is %read3
- }
- if (%test.nick2 isin %read) {
- /set %read4 %read
- /set %read5 $remove( %read4, %test.nick2 )
- if (%read5 isnum) /msg %test.chan %test.nick2 $+ 's access is %read5
- /timer 1 1 /set %done true
- /timer 1 10 /set %test.access False
- }
- if ( wait isin %read6 ) {
- if (%done != true) {
- if (%try < 1) {
- timer 1 2 /cs Wait
- set %try $calc(%try + 1)
- }
- else {
- /set %done true
- /cs Wait
- /set %read5 0
- /msg %test.chan %test.nick2 $+ 's access is 0.
- }
- }
- else if (%done == true) {
- if (%read3 > %read5) {
- if (%rank >= %read3) {
- /msg %test.chan %test.nick $+ , That rank is higher than you are normally able to access. Sorry
- goto unset
- }
- else {
- /echo access list read, Variables found, posting results, unsetting variables
- /cs access %test.chan add %test.nick2 %rank
- /msg %test.chan %test.nick1 has ranked %test.nick2 to access level %rank
- }
- }
- Else if (%read3 == %read5) { /msg %test.chan %test.nick1 $+ , You and %test.nick2 are the same rank, therfore, you cannot change their access.
- }
- Else if (%read5 > %read3) { /msg %test.chan %test.nick1 $+ , you do not have enough access to rank him. Sorry.
- }
- }
- goto end
- :unset
- /timer 1 10 unset %done = false
- /timer 1 10 unset %rank $4
- /timer 1 10 unset %test.access True
- /timer 1 10 unset %test.nick1 $nick
- /timer 1 10 unset %test.nick2 $3
- /timer 1 10 unset %test.nick $nick
- /timer 1 10 unset %test.chan $chan
- /timer 1 10 unset %read
- /timer 1 10 unset %read2
- /timer 1 10 unset %read3
- /timer 1 10 unset %read4
- /timer 1 10 unset %read5
- /timer 1 10 unset %read6
- /timer 1 10 unset %try
- /timer 1 10 /set %test.access False
- :end
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement