Please excuse the double post 
Ok, TGK, as requested...
alias ajoin {
dialog $iif($dialog(favourites),-x,-mh favourites) favourites
}
dialog favourites {
title "Favourites"
size -1 -1 125 108
option dbu
icon $mircdir $+ Engine\ico\Default\home.ico, 0
button "&Close", 1, 86 93 37 12, ok cancel
list 2, 2 1 122 89, size
check "Auto join on &connect", 3, 4 95 60 10
}
On *:Dialog:favourites:*click:2:{
if (!$read(Engine/Text/favourites.txt)) faves.pop
if (!$did(2).sel) halt
tokenize 32 $did($did,1)
if ($1 == rclick) {
.set %select.chan $remove($gettok($did($dname,2).seltext,2-7,32),+fs 0 0 0 , +fs)
faves.pop
}
elseif ($1 == dclick) && (!$server) {
prepare.server
}
elseif ($1 == dclick) {
set -u10 %select.chan $remove($gettok($did(favourites,2).seltext,2-7,32),+fs 0 0 0 , +fs)
perform.event
}
elseif ($1 == sclick) {
}
}
On *:Dialog:favourites:sclick:3:{
$iif($did(3).state == 1,set %a.join,unset) %a.join
}
On *:Dialog:favourites:init:*:{
createMDX
dll $mdx SetDialog $dname
dll $mdx SetBorderStyle 2 staticedge
dll $mdx SetBorderStyle $dname 4 clientedge
dll $mdx SetControlMDX $dname 2 listview flatsb report single showsel rowselect grid icon > $vdll
dll $mdx SetColor favourites background $rgb(0,0,0)
dll $mdx SetColor $dname 2 textbg $rgb(214,67,0)
did -i $dname 2 1 settxt color $rgb(64,0,128)
did -i $dname 2 1 headerdims 118:1 102:2
did -i $dname 2 1 headertext Channel $chr(9) Server
if ($var(%a.join)) did -c $dname 3
chan.list
}
alias -l perform.event {
.join %select.chan
align Joining %select.chan $+ ...
if ($var(%a.join)) ajoin
}
alias -l chan.list {
did -r favourites 2
var %i = 1
while (%i <= $lines(Engine/Text/favourites.txt)) {
did -a favourites 2 $gettok($read(Engine/Text/favourites.txt,%i),1,32) $chr(9) $gettok($read(Engine/Text/favourites.txt,%i),2-,32)
inc %i
}
}
alias -l prepare.server {
tokenize ($did($dname,2).text,32)
server $gettok($read(Engine/Text/favourites.txt),2-,32)
}
alias -l set.chan {
var %channel = $input(Enter channel name,129,Add Channel)
var %server = $input(Enter server name,129,Add Server,$server)
write -a Engine/Text/favourites.txt %channel %server
chan.list
}
alias -l rem.chan {
if ($input(Are you sure you want to delete the channel %select.chan from your favourites list?,qcyd,Confirm)) {
splay clear.wav
write -dl $+ $calc($did($dname,2).sel + 1) Engine/Text/favourites.txt
; did -r $dname 2
}
chan.list
}
alias -l cull.list {
if $input(Are you sure you want to delete your favourites list? $crlf $crlf $+ This process cannot be undone,wnd,Confirm)
splay clear.wav | write -c Engine/Text/favourites.txt
chan.list
}
alias join.chan {
var %xx = 1
while (%xx <= $lines(Engine/Text/favourites.txt)) {
.join $read(Engine/Text/favourites.txt,%xx)
inc %xx
}
}
On *:SIGNAL:*MPOPUP.*: {
if ($1 == 465) .list
if ($1 == 490) set.chan
if ($1 == 491) rem.chan
if ($1 == 492) chan.list
if ($1 == 493) cull.list
}