menu channel,menubar,query {
[Friend List]
.$iif($dialog(mp),$style(2)) [Open]:dialog -md fla fla
.[Set on/off]
..[on]: unset %stop | echo -a on
..[off]: set %stop A | echo -a off
}
dialog fla {
title "Friends List"
size -1 -1 84 122
option dbu
edit "", 1, 2 14 80 10, autohs
box "Enter NickName", 2, 0 5 84 23
button "Add", 3, 2 30 80 8, flat
button "Remove", 4, 2 101 80 9, flat
box "Friend List", 5, 0 40 84 59
button "Done", 7, 2 112 80 9, flat ok
list 8, 2 49 80 47, size vsbar
}
ON *:LOAD {
hmake fdlist 15
set %nuy 0
}
ON *:DIALOG:fla:init:0:{
var %nug 1
while ( %nug <= %nuy ) {
did -a fla 8 $hget(fdlist,%nug).item
inc %nug
}
unset %nug
}
ON *:DIALOG:fla:sclick:3:{
if ( $did(1) == $null ) { return }
else {
auser 5 $did(1)
hadd -m fdlist $did(1) %nuy
inc %nuy
did -r fla 8,1
var %nug 1
while ( %nug <= %nuy ) {
did -a fla 8 $hget(fdlist,%nug).item
inc %nug
}
unset %nug
}
}
ON *:DIALOG:fla:sclick:4:{
if ( $did(8).sel == $null) { return }
else {
ruser $did(8).seltext
set %ugf $did(8).seltext
did -d fla 8 $did(8).sel
hdel -sw fdlist %ugf
dec %nuy
unset %ugf
}
}
ON *:DIALOG:fla:sclick:7: {
.hsave -so fdlist $scripdir $+ fdlist.mrc
}
on 1:OPEN:?:*: {
if ( %stop == A ) { return }
else {
msg $nick Hallo $nick ask to talk to me in a channel . I am not accepting private massages from you .
echo -a 4,1 < $+ $nick $+ >  8,1 $1-
close -m $nick }
}
on 5:OPEN:?:*: {
if ( %stop == A ) { return }
else { return }
}
ON *:START {
hmake fdlist 15
.hload -s fdlist $scriptdir $+ fdlist.mrc
}
ON *:UNLOAD {
hfree fdlist
}