This list command that you want to script, is it actually related to the default /list?
If you want to override the default /list behaviour, simply script it like:
alias list {
; my code
}
When doing /list, it will not perform the normal /list then.
Or do you mean you want to do something with the incoming channels after you do a /list, but don't want to see it in the default window "Channel List"?
If so, you can use this to hide the window, and when the retrieving of the list is finished, it will automatically close it.
#list on
raw 321:*: window -h "channels list" | halt
raw 323:*: window -c "channels list" | halt
raw 322:*:{
; $1 = your nickname
; $2 = #channel
; $3 = number of people
; $4- = topic
}
#list end
I have added the raw 322 so that you can see what you can use when a listing is in process. It is however not needed if all you want to do is hide the default channels list, so remove it if so.