nav.gif Home » Snippets » Window Access List

ammenul.gif
ammenur.gif
Please Register/Login to enhance your access of our site and services. We support Twitter and Facebook logins. Logging in will reduce the amount of advertisments.
ammenul.gif
ammenur.gif


ammenutopl.gif
TG007 Snippet
ammenutopr.gif
Window Access List
Category: General IRC

About
This should work on any server that uses an access list for the rooms with raw 803-805. This hasn't been tested extensively. Also, uploading a very large access list can flood you out depending on the server settings so be advised to script for that if needed.

Opens a window access list for each room separately. When open, access list auto updates every 60 seconds. Includes nicklist code to add to the access list. Delete, edit entries, clear access list, save and load.

Written for irc.chatcore.com. To use on another server, change "irc.chatcore.com" to your servers $network or it won't work.


on *:start:{
  ;Sets the directory to lists\axis. If you change it, change save and load as well.
  if (!$isdir(lists)) mkdir lists
  if (!$isdir(lists\axis)) mkdir lists\axis 
}
alias axis {
  if (-* iswm $1) {
    if ($me !isop $2) return
    if ($1 = -a) access $2 add $$input(What level? $crlf Owner $crlf Host $crlf Voice $crlf Grant $crlf Deny,e,$network Axis) $$input(What Address?,e,$network Axis) $$input(For how many minutes? $crlf Forever: 0 $crlf One Day: 1440,e,$network Axis) $input(Comment,e,$network Axis)
    elseif ($1 = -u) && ($exists($3)) {
      access $2 clear
      var %x = $lines($3)
      while ($read($3,%x)) {
        access $2 add $read($3,%x)
        dec %x   
      }
      echo -s Axis Upload Complete
      .timerax_ 1 1 axis $2
    }
    else access $2 delete $3 $6
    if (-l* iswm $1) access $2 add $right($1,-2) $6 $5 $7-
    elseif (-d* iswm $1) access $2 add $3 $6 $right($1,-2) $7-
    elseif ($1 = -c) access $2 add $3 $6 $5 %ccore_comment
    .timerax -m 1 500 axis $2
  }
  if (#* !iswm $1) || ($me !isop $1) return No Channel Given
  var %x_ = $+(@aXis_,$1)
  if (!$window(%x_)) {
    if ($2) {
      .timerautoax_ $+ $1 off
      return
    }  
    window -De2k0lsv -t12,32,10,90,20 %x_
    .timerautoax_ $+ $1 0 60 axis $1 x
  }
  elseif (!$2) window -a %x_
  clear %x_
  aline -l %x_ 15Level $chr(9) Set By $chr(9) 0 $chr(9) Mask $chr(9) Comments
  access $1 list
}
on *:close:@axis_*:.timerautoax_ $+ $right($target,-6) off
raw *:*:{
  if ($network != irc.chatcore.org) return
  if ($numeric = 804) {
    if (%axsave_ [ $+ [ $2 ] ]) write $ifmatch $3-5 $7-
    elseif ($window($+(@axis_,$2))) aline -l $+(@axis_,$2) $3 $chr(9) $6 $chr(9) $5 $chr(9) $4 $chr(9) $7-
  }
  elseif ($numeric = 805) {
    if (%axsave_ [ $+ [ $2 ] ]) {
      unset %axsave_ [ $+ [ $2 ] ]
      echo -s Axis Save Complete
    }
  }
  ;halt access raw data in status window
  if (80* iswm $numeric) halt
}
menu channel {
  $iif($me isop #,Axis List):axis #
}
menu nicklist {
  $iif($me isop #,Access)
  .Deny:access # add deny $$1
  .-
  .Owner:access # add owner $$1
  .Host:access # add host $$1
  .Voice:access # add voice $$1
  .Grant:access # add grant $$1
}
menu @axis_* {
  lbclick:editbox $menu $replace($sline($menu,1),$chr(9),$chr(32))
  $style(2) $right($menu,-6) aXis List:Return
  -
  $iif($sline($menu,1),Edit)
  .Level
  ..$iif($left($gettok($sline($menu,1),1,9),-1) = owner,$style(3)) Owner:axis -lOwner $right($menu,-6) $replace($remove($sline($menu,1),$chr(32)),$chr(9),$chr(32))
  ..$iif($left($gettok($sline($menu,1),1,9),-1) = host,$style(3)) Host:axis -lHost $right($menu,-6) $replace($remove($sline($menu,1),$chr(32)),$chr(9),$chr(32))
  ..$iif($left($gettok($sline($menu,1),1,9),-1) = voice,$style(3)) Voice:axis -lVoice $right($menu,-6) $replace($remove($sline($menu,1),$chr(32)),$chr(9),$chr(32))
  ..$iif($left($gettok($sline($menu,1),1,9),-1) = grant,$style(3)) Grant:axis -lGrant $right($menu,-6) $replace($remove($sline($menu,1),$chr(32)),$chr(9),$chr(32))
  ..$iif($left($gettok($sline($menu,1),1,9),-1) = deny,$style(3)) Deny:axis -lDeny $right($menu,-6) $replace($remove($sline($menu,1),$chr(32)),$chr(9),$chr(32))
  .Duration
  ..$iif($mid($gettok($sline($menu,1),3,9),2,1) = 0,$style(3)) Forever:axis -d0 $right($menu,-6) $replace($remove($sline($menu,1),$chr(32)),$chr(9),$chr(32))
  ..$iif($mid($gettok($sline($menu,1),3,9),2,1) = 10080,$style(3)) 1 Week:axis -d10080 $right($menu,-6) $replace($remove($sline($menu,1),$chr(32)),$chr(9),$chr(32))
  ..$iif($mid($gettok($sline($menu,1),3,9),2,1) = 1440,$style(3)) 24 hours:axis -d1440 $right($menu,-6) $replace($remove($sline($menu,1),$chr(32)),$chr(9),$chr(32))
  ..$iif($mid($gettok($sline($menu,1),3,9),2,1) = 60,$style(3)) 1 hour:axis -d60 $right($menu,-6) $replace($remove($sline($menu,1),$chr(32)),$chr(9),$chr(32))
  ..$iif($mid($gettok($sline($menu,1),3,9),2,1) = 30,$style(3)) 30 min:axis -30 $right($menu,-6) $replace($remove($sline($menu,1),$chr(32)),$chr(9),$chr(32))
  .Mask:axis $+(-m,$$?="Enter New Mask") $right($menu,-6) $replace($remove($sline($menu,1),$chr(32)),$chr(9),$chr(32))
  .Comment:{ set -e %ccore_comment $$?="Enter New Comment" | axis -c $right($menu,-6) $replace($remove($sline($menu,1),$chr(32)),$chr(9),$chr(32)) }
  $iif($sline($menu,1),Delete):axis - $right($menu,-6) $replace($sline($menu,1),$chr(9),$chr(32))
  $iif(!$sline($menu,1) && $me isop $right($menu,-6),Add):axis -a $right($menu,-6)
  -
  Clear
  ..Owners:{ access $right($menu,-6) clear owner | axis $right($menu,-6) }
  ..Hosts:{ access $right($menu,-6) clear host | axis $right($menu,-6) }
  ..Voiced:{ access $right($menu,-6) clear voice | axis $right($menu,-6) }
  ..Grants:{ access $right($menu,-6) clear grant | axis $right($menu,-6) }
  ..Denies:{ access $right($menu,-6) clear deny | axis $right($menu,-6) }
  ..All:{ access $right($menu,-6) clear | axis $right($menu,-6) }
  Save:{ set %axsave_ $+ $right($menu,-6) $sfile($mircdirlists\axis\ $+ $right($menu,-6) $+ _axis.txt,Axis Save,Save) | .raw access $right($menu,-6) list }
  Load:axis -u $right($menu,-6) $sfile($mircdirlists\axis\,Axis UpLoad,UpLoad)
  -
  Refresh aXis:axis $right($menu,-6)
}


Comments

No Comments Posted
Sorry you must register and log-in to post comments
ammenul.gif
ammenur.gif
ammenutopl.gif
Info
ammenutopr.gif
Snippet Information
Creator:
Date Added:5/8/11
Last Updated:5/9/11
Tags:Access List IRCx IRC
Problem?Report Snippet
ammenul.gif
ammenur.gif



19 user(s) currently browsing site (0 members, 19 guests, 0 anonymous)
No Members Logged In

11 Users in IRCommunity
inføвøт, err0r, ●fiestýβสbỳ●, båbyġurł, DennieWennie™, Erroneous, payback, TOP™, ﴾Ɣ﴿ⓨⓢⓣⓘⓒ★§ⓟⓔⓛⓛ, danger , extremity



lhfooter.gif
TechDesigns007.com | Valid XHTML 1.0 | Valid CSS | Load Time: 0.00 sec(s)
rfooter.gif


Latest Alert: 10.14.2011 mIRC 7.22 released
oldline
oldline
oldline
oldline