Services XOP-Like Access System v1.1

By Myidentityisasecret on Apr 29, 2013

So, I changed it up a bit, it's a lot better now.
I'll work on some more changes soon.
Thanks!

; XOP Script v2 made by Tanmay.
; For help, do /server -m irc.secretchocolate.info -j #chat
; That will bring you to my channel and you can ask me for help there.
; Good luck and I hope this script helps you!

; This part will actually voice/halfop/op/admin/owner the person 
on *:JOIN:*: {
  if ($($+(%,$chan,.,XOP),2) == ON) {
    if ($($+(%,$nick,.,level,.,$chan),2) == voice) {
      /mode $chan +v $nick
    }
    if ($($+(%,$nick,.,level,.,$chan),2) == halfop) {
      /mode $chan +h $nick
    }
    if ($($+(%,$nick,.,level,.,$chan),2) == op) {
      /mode $chan +o $nick
    }
    if ($($+(%,$nick,.,level,.,$chan),2) == admin) {
      if ($($+(%,$nick,.,level,.,$chan),2) != owner) {
        /mode $chan +ao $nick $nick
      }
    }
    if ($($+(%,$nick,.,level,.,$chan),2) == owner) {
      /mode $chan +qo $nick $nick
    }
  }
}
; This part will allow you to add and remove people from the access list. 
on *:TEXT:*:#: {
  if ($1 == .xop) {
    if ($nick isop $chan) {
      if ($2 == on) {
        notice $nick XOP enabled.
        set $+(%,$chan,.,XOP) ON
        set $+(%,$nick,.,level,.,$chan) owner
        set $+(%,$nick,.,level,.,$chan,.,access) admin
      }
      if ($2 == off) {
        notice $nick XOP diabled.
        set $+(%,$chan,.,XOP) OFF
      }
    }
  }
  if ($2 != $null) {
    if ($($+(%,$nick,.,level,.,$chan,.,access),2) == admin) { 
      if ($1 == .avoice) {
        set $+(%,$2,.,level,.,$chan) voice
        msg $chan $2 will now be automatically voiced.
      }
      if ($1 == .ahalfop) {
        set $+(%,$2,.,level,.,$chan) halfop
        msg $chan $2 will be now automatically given halfop.
      } 
      if ($1 == .aop) {
        set $+(%,$2,.,level,.,$chan) op
        msg $chan $2 will now automatically be given op.
      }
      if ($1 == .aadmin) {
        set $+(%,$2,.,level,.,$chan) admin
        set $+(%,$2,.,level,.,$chan,.,access) admin
        msg $chan $2 will now automatically be given admin.
      }
      if ($1 == .aowner) {
        set $+(%,$2,.,level,.,$chan) owner
        set $+(%,$2,.,level,.,$chan,.,access) admin
        msg $chan $2 will now automatically be given owner.
      }
      if ($1 == .rvoice) {
        unset $+(%,$2,.,level,.,$chan)
        msg $chan $2 will no longer automatically be voiced.
      }
      if ($1 == .rhalfop) {
        unset $+(%,$2,.,level,.,$chan)
        msg $chan $2 will no longer be automatically be given halfop
      }
      if ($1 == .rop) {
        unset $+(%,$2,.,level,.,$chan)
        msg $chan $2 will no longer be automatically given op.
      }
      if ($1 == .radmin) {
        unset $+(%,$2,.,level,.,$chan)
        msg $chan $2 will no longer be automatically given op.
      }
      if ($1 == .rowner) {
        unset $+(%,$2,.,level,.,$chan) {
          msg $chan $2 will no longer be given owner.
        }
      }
    }
  }
  ; That's all, thanks for your time!
  ;  I hope this helps you! Good luck!

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.