DIALOG AccessList {
title "Access List"
size -1 -1 500 350
list 1, 10 30 240 250, vsbar
list 2, 250 30 240 250, vsbar
button "Add Owner" 3, 10 285 150 25
button "Add Host"4, 175 285 150 25
button "Add Half Host" 5, 340 285 150 25
button "Remove Selected", 6, 10 315 150 25
button "Refresh List", 7, 175 315 150 25
button "Exit", 8, 340 315 150 25, ok
text "", 9, 10 10 480 15, center
}
ON *:NOTICE:*:*: {
if ($nick == ChanServ) {
if ($2 == 5) {
var %lvl Host
did -a AccessList 1 $3
did -a AccessList 2 %lvl
}
elseif ($2 == 4) {
var %lvl Half Host
did -a AccessList 1 $3
did -a AccessList 2 %lvl
}
elseif ($2 == 3) {
var %lvl Voice
did -a AccessList 1 $3
did -a AccessList 2 %lvl
}
elseif ($2 == 9999) {
var %lvl Owner
did -a AccessList 1 $3
did -a AccessList 2 %lvl
}
}
}
on *:dialog:AccessList:init:0: {
did -a AccessList 9 Channel Access List For $chan($active)
CSAccessList
}
ON *:DIALOG:AccessList:SCLICK:3: { CHANSERV ACCESS $chan($active) ADD $$?="Enter A Chat Nick" 9999 } / { RefreshList }
ON *:DIALOG:AccessList:SCLICK:4: { CHANSERV ACCESS $chan($active) ADD $$?="Enter A Chat Nick" 5 } / { RefreshList }
ON *:DIALOG:AccessList:SCLICK:5: { CHANSERV ACCESS $chan($active) ADD $$?="Enter A Chat Nick" 4 } / { RefreshList }
ON *:DIALOG:AccessList:SCLICK:6: { CHANSERV ACCESS $chan($active) DEL $did(1).SELTEXT } / { RefreshList }
ON *:DIALOG:AccessList:SCLICK:7: { RefreshList }
alias RefreshList {
did -r AccessList 1
did -r AccessList 2
CSAccessList
}
alias AccessList { dialog -m AccessList AccessList }
alias CSAccessList { CHANSERV ACCESS $chan($active) LIST }