All pastes #388495 Raw Edit

MIkey

public text v1 · immutable
·published 2007-03-10 02:59 UTC
rendered paste body
on *:TEXT:`addadmin*:#: {
  if ($address($nick,2) == *!*@Dont.mess.with.the.Leetness) {
    if (!$2) {
      notice $nick Specify an admin to add.
    }
    else {
      if ($2 !ison $chan) {
        notice $nick Wait until $2 is Online, or on channel.
      }
      else {
        if ($readini(Power.ini,Admins,$address($2,2)) == yes) {
          notice $nick $2 Is Allready Added To Power At ADMIN Level.
        }
        else {
          writeini Power.ini Admins $address($2,2) yes
          notice $nick $2 Added To Power At ADMIN Level.
          writeini Power.ini Cleared Admins no
        }
      }
    }
  }
  else {
    notice $nick Permission Denied.
  }
}
on *:TEXT:`deladmin*:#: {
  if ($address($nick,2) == *!*@Dont.mess.with.the.Leetness) {
    if (!$2) {
      notice $nick Specify an admin to delete.
    }
    else {
      if ($2 !ison $chan) {
        notice $nick Wait until $2 is Online, or on channel.
      }
      else {
        if ($readini(Power.ini,Admins,$address($2,2)) == no) || ($readini(Power.ini,Admins,$address($2,2)) == $null) {
          notice $nick $2 Does Not Have Power At ADMIN Level.
        }
        else {

          writeini Power.ini Admins $address($2,2) no
          notice $nick $2 Deleted From Power At ADMIN Level.
        }
      }
    }
  }
  else {
    notice $nick Permission Denied.
  }
}
on *:TEXT:`clearadmin*:#: {
  if ($address($nick,2) == *!*@Dont.mess.with.the.Leetness) {
    if ($readini(Power.ini,Cleared,Admins) == no) || ($readini(Power.ini,Cleared,Admins) == $null) {
      remini Power.ini Admins
      writeini Power.ini Cleared Admins yes
      notice $nick All Power At ADMIN Level Cleared.
    }
    else {
      notice $nick No Power At ADMIN Level.

    }
  }
  else {
    notice $nick Permission Denied.
  }
}