Skip to content
General IRCX

Server while loop

A TG007 community discussion started by Simon.

Discussion 4 posts
Page 1 of 1
Open
Topic #4754 · 4 published posts · 1,262 views

I sometimes chat on multiple servers and for my GUI have the name of the server displayed in an edit box on a docked dialog using on connect did -ra $dname <id> %sel.serv etc etc.

 

I'm trying to use a loop to capture the server name and display it to the dialog ID when I toggle between servers. Can someone help me clean up this snippet please?

alias con.list {
 %r = 1 
 while %r = ($server(%r)) {
   .did -ra bottom 4 Server: $server(%r)
 }
 inc %r
}

 

Thanks in advance

Get the Tech outta here!

on *:ACTIVE:*: { if ($active == Status Window) { did -ra bottom 4 Server: $server } }

 

That will do it for whenever you click on a server window. No need for loops

D'oh I'm such an idiot - I had the same thing only I was using it on the wrong event :$ I feel like an idiot. Thanks David

Get the Tech outta here!

lol no worries simon.