0 LIKES
Snippet
Buzzen Access Window
In Category Buzzen Posted by err0r On 02/09/11
Simple @window access lister
alias buzzaccess { set -e %alister.room $1 window -blMk -t10,75,89,112 +benstx @Accesslist buzzaccessstart } alias buzzaccessstart { clear @Accesslist aline @Accesslist Type $chr(9) Mask $chr(9) Time $chr(9) Set By $chr(9) Notes aline @Accesslist $chr(160) aline @Accesslist empty access %alister.room list } raw 803:*:{ if ($window(@Accesslist)) { /dline @Accesslist 3 | haltdef } } raw 804:*:{ if ($window(@Accesslist)) { if ($3 === OWNER) { var %nc 07 } if ($3 === HOST) { var %nc 06 } if ($3 === VOICE) { var %nc 03 } if ($3 === GRANT) { var %nc 05 } if ($3 === DENY) { var %nc 04 } aline @Accesslist %nc $+ $3 $chr(9) $4 $chr(9) $iif($5 == 0,No Limit,$5) $chr(9) $gettok($6,1,33) $chr(9) $7- haltdef } } raw 805:*:{ if ($window(@Accesslist)) { haltdef } } menu channel { $iif($me !isop $chan,$style(2)) Access: buzzaccess $chan } menu @Accesslist { Refresh: buzzaccessstart - $iif($sline(@Accesslist,0) == $null,$style(2)) Remove $sline(@Accesslist,0) $iif($sline(@Accesslist,0) > 1,entries,entry): { var %ra 1 while ($sline(@Accesslist,%ra)) { .access %alister.room DELETE $gettok($strip($v1),1,9) $gettok($strip($v1),2,9) inc %ra } buzzaccessstart } - Remove Owners: { access %alister.room CLEAR OWNER | buzzaccessstart | access %alister.room list } Remove Hosts: { access %alister.room CLEAR HOST | buzzaccessstart | access %alister.room list } Remove Voice: { access %alister.room CLEAR VOICE | buzzaccessstart | access %alister.room list } Remove Grant: { access %alister.room CLEAR GRANT | buzzaccessstart | access %alister.room list } Remove Deny: { if ($input(Are you sure you want to clear ALL denies?,uyqd,Attention!) == $true) { access %alister.room CLEAR DENY | buzzaccessstart | access %alister.room list } } Remove All: { if ($input(Are you sure you want to clear ALL Entries?,uyqd,Attention!) == $true) { access %alister.room CLEAR | buzzaccessstart | access %alister.room list } } - Save Access: { if ($isdir($mircdiraccess) == $false) { /mkdir " $+ access $+ " } var %arn $replace($remove(%alister.room,$chr(37),$chr(35)),\b,$chr(32)) if ($isfile($mircdiraccess\ $+ accesslist- $+ %arn $+ .txt)) { .remove " $+ $mircdiraccess\ $+ accesslist- $+ %arn $+ .txt $+ " } var %sl 3 while ($line(@Accesslist,%sl)) { write " $+ $mircdiraccess\ $+ accesslist- $+ %arn $+ .txt " $gettok($strip($v1),1,9) $gettok($strip($v1),2,9) $replace($gettok($strip($v1),3,9),No Limit,0) : $+ $gettok($strip($v1),5-,9) inc %sl } noop $input(Access List Saved,uodw,Attention!) } Restore Access: { var %bl 1 var %arn $replace($remove(%alister.room,$chr(37),$chr(35)),\b,$chr(32)) while ($read($mircdiraccess\accesslist- $+ %arn $+ .txt,%bl)) { access %alister.room ADD $read($mircdiraccess\accesslist- $+ %arn $+ .txt,n,%bl) inc %bl } buzzaccessstart noop $input(Access list reloaded!,uodw,Attention!) } }
Comments 0
You must be logged in to comment.