You can add a popupmenu to a custom window.
For example, make a .txt file named "listchannels.txt", and put this in it:
Join Channel: ls_joinchans
Who Channel: ls_whochans
Then in your script, add these 2 aliases:
alias ls_joinchans {
var %a = 1, %b
while $sline($active,%a) { %b = %b $+ , $+ $gettok($v1,1,255) | inc %a }
join %b
}
[color:red] [/color]
alias ls_whochans {
var %a = 1, %b
while $sline($active,%a) {
if $me ison $gettok($v1,1,255) { who $v1 }
inc %a
}
}
Then in your raw code, when creating the window, specify the .txt file like:
if !$window($+(@List-,$network)) { window -kal $+(@List-,$network)
listchannels.txt }
This was scripted in a rush, so there could be mistakes, and optimization might be necessary. Btw I'm curious
why you use $chr(255) for your alignment, it looks kinda odd, but I suppose that is a personal preference.
Greets