Hmm I can't remember how to do that, it may be possible by using a listbox.
How about using something like this:
alias xdcc_stats {
var %wn = @ServerStats
$iif($window(%wn),clear %wn,window -k0 %wn 344 167 383 126)
.echo %wn 11############ 9XDCC Server Stats 11############
.echo %wn 11Number of XDCC list : $+ 9 $xdcc(access)
.echo %wn 11Number of XDCC send : $+ 9 $xdcc(sent)
.echo %wn 11Number of successfull send : $+ 9 $xdcc(fullsent)
.echo %wn 11############ 9XDCC Server Stats 11############
}
I set a variable for the custom window for less clutter.
I changed the size of the window so the echoed text fits exactly inside it.
I added an $iif() identifier to check if the window is open or not. If it is open the window gets cleared, if its not open it will open.