Modlist Script - HawkIRC

By HawkIRC on Apr 04, 2007

Made it for channel owners.

on *:TEXT:*:#: {
  if ($1 == !add && $readini(modlist.ini,Owners,$nick)) {
    if (!$2) { notice $nick Please type in a mod level. }
    elseif (!$3) { notice $nick Please type in a nickname. }
    elseif ($3 == 1) { 
      writeini modlist.ini hmods $2 Yes
      msg $chan  $+ $2  $+ has been added to the Half Mod list. 
    }
    elseif ($3 == 2) { 
      writeini modlist.ini fmods $2 Yes
      msg $chan  $+ $2  $+ has been added to the Full Mod list. 
    }
    elseif ($3 == 3) { 
      writeini modlist.ini admins $2 Yes
      msg $chan  $+ $2  $+ has been added to the Admin list. 
    }
    elseif ($3 == 4) { 
      writeini modlist.ini owners $2 Yes
      msg $chan  $+ $2  $+ has been added to the Owner list. 
    }
  }
  if ($1 == !del && $readini(modlist.ini,Owners,$nick)) {
    if (!$2) { notice $nick Please type in a nickname to delete from the modlist. }
    elseif ($readini(modlist.ini,hmods,$2)) { remini modlist.ini hmods $2 | msg $chan  $+ $2  $+ was removed from the modlist. | /mode $chan -h $2 }
    elseif ($readini(modlist.ini,fmods,$2)) { remini modlist.ini fmods $2 | msg $chan  $+ $2  $+ was removed from the modlist. | /mode $chan -o $2 }
    elseif ($readini(modlist.ini,admins,$2)) { remini modlist.ini admins $2 | msg $chan  $+ $2  $+ was removed from the modlist. | /mode $chan -a $2 }
    elseif ($readini(modlist.ini,owners,$2)) { remini modlist.ini owners $2 | msg $chan  $+ $2  $+ was removed from the modlist. | /mode $chan -q $2 }
    else { notice $nick $2 was not found in the modlist. }
  }
  if ($1 == !modlist) { 
    set -u0 %x 1
    while ($ini(modlist.ini,hmods,%x)) {
      set -u0 %hmods % $+ $ini(modlist.ini,hmods,%x) $+ , %hmods
      inc %x
    }
    set -u0 %x 1
    while ($ini(modlist.ini,fmods,%x)) {
      set -u0 %fmods @ $+ $ini(modlist.ini,fmods,%x) $+ , %fmods
      inc %x
    }
    set -u0 %x 1
    while ($ini(modlist.ini,admins,%x)) {
      set -u0 %admins & $+ $ini(modlist.ini,admins,%x) $+ , %admins
      inc %x
    }
    set -u0 %x 1
    while ($ini(modlist.ini,owners,%x)) {
      set -u0 %owners ~ $+ $ini(modlist.ini,owners,%x) $+ , %owners
      inc %x
    }
    notice $nick 4Owners: $iif(%owners,$left(%owners,-1) $+ .,None)
    notice $nick 7Admins: $iif(%admins,$left(%admins,-1) $+ .,None)
    notice $nick 12Full Mods: $iif(%fmods,$left(%fmods,-1) $+ .,None)
    notice $nick 9Half Mods: $iif(%hmods,$left(%hmods,-1) $+ .,None)
  }
}

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.