Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;access lister
- alias dAccess { if ($active == Status Window) { halt } | if ($dialog(dAccess)) { dialog -x dAccess } | dialog -m dAccess dAccess_table }
- dialog dAccess_table {
- title "Buzzen Access Lister"
- size -1 -1 620 350
- }
- on *:dialog:dAccess_table:init:0:{
- dcx Mark $dname dAccess_cb
- xdialog -b $dname +ty
- xdialog -c $dname 4 listview 5 5 475 275 report singlesel fullrow nolabelwrap tooltip tabstop grid transparent showsel
- xdid -t $dname 4 +l 0 80 Level $chr(9) +l 0 120 User $chr(9) +l 0 188 Address Mask
- xdid -w $dname 4 +n 0 $Mircdiricons/owner.ico
- xdid -w $dname 4 +n 0 $Mircdiricons/host.ico
- xdid -w $dname 4 +n 0 $Mircdiricons/deny.ico
- xdialog -c $dname 11 button 497 20 100 25
- xdid -t $dname 11 Owner
- xdialog -c $dname 12 button 497 50 100 25
- xdid -t $dname 12 Host
- xdialog -c $dname 13 button 497 80 100 25
- xdid -t $dname 13 Voice
- xdialog -c $dname 14 button 497 110 100 25
- xdid -t $dname 14 Deny
- xdialog -c $dname 21 text 497 1 100 20 center
- xdid -t $dname 21 Clear All
- xdialog -c $dname 22 text 497 140 100 20 center
- xdid -t $dname 22 Add Access
- xdialog -c $dname 23 button 497 160 100 25
- xdid -t $dname 23 Owner
- xdialog -c $dname 24 button 497 190 100 25
- xdid -t $dname 24 Host
- xdialog -c $dname 25 button 497 220 100 25
- xdid -t $dname 25 Voice
- xdialog -c $dname 26 button 497 245 100 25
- xdid -t $dname 26 Deny
- xdialog -c $dname 30 button 497 275 100 25
- xdid -t $dname 30 Save Access
- xdialog -c $dname 1 button 497 310 100 25
- xdid -w $dname 1 +n 0 $Mircdiricons/helpop.ico
- xdid -t $dname 1 Access Self
- //access $active List
- }
- alias tiac { /access $chan List }
- ;// Callback alias for dAccess
- alias dAccess_cb {
- if (mouse isin $2) { halt }
- elseif ($2 == sclick) && ($3 == 11) {
- access # clear owner
- xdid -r dAccess_table 4
- $tiac
- }
- elseif ($2 == sclick) && ($3 == 12) {
- access # clear host
- xdid -r dAccess_table 4
- $tiac
- }
- elseif ($2 == sclick) && ($3 == 13) {
- access # clear voice
- xdid -r dAccess_table 4
- $tiac
- }
- elseif ($2 == sclick) && ($3 == 14) {
- access # clear Deny
- xdid -r dAccess_table 4
- $tiac
- }
- elseif ($2 == sclick) && ($3 == 23) {
- var %Mask = $Input( $Gettok(Add Owner Access, -1, 32) $+ ?, qe, $Lang(al_add_title), *!*someonesaddresshere)
- access $chan ADD OWNER %Mask
- xdid -r dAccess_table 4
- $tiac
- }
- elseif ($2 == sclick) && ($3 == 24) {
- var %Mask = $Input( $Gettok(Add Host Access, -1, 32) $+ ?, qe, $Lang(al_add_title), *!*someonesaddresshere)
- access $chan ADD HOST %Mask
- xdid -r dAccess_table 4
- $tiac
- }
- elseif ($2 == sclick) && ($3 == 25) {
- var %Mask = $Input( $Gettok(Add Voice Access, -1, 32) $+ ?, qe, $Lang(al_add_title), *!*someonesaddresshere)
- access $chan ADD Voice %Mask
- xdid -r dAccess_table 4
- $tiac
- }
- elseif ($2 == sclick) && ($3 == 25) {
- var %Mask = $Input( $Gettok(Add Deny Access, -1, 32) $+ ?, qe, $Lang(al_add_title), *!*someonesaddresshere)
- access $chan ADD Deny %Mask
- xdid -r dAccess_table 4
- $tiac
- }
- elseif ($2 == sclick) && ($3 == 30) {
- var %i = 0
- while (%i < $nick(#,0)) {
- var %i = $calc(%i + 1)
- writeini -n access.ini Access $+ $chan $address($nick(#,%i),1) $nick(#,%i) $remove($replace($chan,!,$chr(32),\b,$chr(32),$chr(45),$chr(32)),$chr(37),$chr(35)))
- }
- echo -a Access List Saved Access for $remove($replace($chan,!,$chr(32),\b,$chr(32),$chr(45),$chr(32)),$chr(37),$chr(35)))
- }
- elseif ($2 == sclick) && ($3 == 1) {
- access # Add OWNER $Ial($me).addr | access # ADD HOST $Ial($me).addr
- xdid -r dAccess_table 4
- $tiac
- }
- elseif ($2 == RCLICK) && ($3 == 4) && ($4-) {
- var %Menu = dAcc , %i = 0
- if ($xpopup(%Menu).ismenu) xpopup -d %Menu
- xpopup -c %Menu verticalrev
- xpopup -p %Menu $Rgb(255, 255, 255) $Rgb(119, 136, 153) $Rgb(112, 128, 144) $Rgb(119, 136, 153) $Rgb(119, 136, 153) $Rgb(248, 248, 255)
- xpop -a %Menu 0 $Chr(9) + 1 0 Access Address : $address($nick(#,%i),1)) $xdid(dAccess_table, 4, 3).seltext
- xpop -a %Menu 0 $Chr(9) + 2 0 -
- xpop -a %Menu 0 $Chr(9) + 3 0 Clear All Selected Access Entry
- xpop -a %Menu 0 $Chr(9) + 4 0 Clipboad Whole Access Entry
- xpop -a %Menu 0 $Chr(9) + 5 0 -
- xpop -a %Menu 0 $Chr(9) + 6 0 Refresh Access List
- xpopup -s %Menu + $Mouse.dx $Mouse.dy
- }
- }
- raw 804:*: {
- var %Ial_Match = $Iif($Ial(*!* $+ $4).nick, $Ifmatch, Unknown), %Icon = $Iif($3 == OWNER, 1, $Iif($3 == HOST, 2, $Iif($3 == DENY, 3, 0))),
- xdid -a dAccess_table 4 0 0 + 0 0 0 0 $rgb(170,213,255) $rgb(0,255,255) $3 $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) $buzz.decode(%Ial_Match) $chr(9) + 0 -1 $rgb(120,255,210) $rgb(255,255,0) $4
- }
- raw 805:*: { halt }
- on *:SIGNAL:Xpopup-*: {
- var %D = dAccess_table, %Menu = $Gettok($Signal, 2-, 45), %col = $xdid(%D, 4, 1).seltext, %clo = $xdid(%d, 4, 3), %i = 0
- if (%menu == dAcc) {
- var %chan = Access $active list
- if ($1 == 3) {
- access $active Delete %col $xdid(dAccess_table, 4, 3).seltext
- }
- xdid -r dAccess_table 4
- %chan
- if ($1 == 4) {
- Clipboard %col $ial($nick).addr
- elseif ($1 == 6)
- xdid %d 4
- %chan
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement