I am lead to believe that a code block (could be a raw numerical handler) can obtain the cid of the connection that called it though the use of $cid.

What about an alias that is called from within that original block ? Does it inherit the cid or does it have to be passed as a parameter ?

I would also ask the same thing particularly regarding dialog code blocks. I know the call to the dialog gets the cid of the connection that it was called from ($cid again), but what about the dialog handlers (the blocks with :sclick:<id number>:{ etc. ) ?

I have a few dialogs that I have converted so that you can call the dialog up from one connection, deal with that connections info, make changes etc., then switch (I use a drop down to select the service from), get it's cid from a look up in a hash table, then try to work from that. Do I specifically have to pass something to the mouse click handlers etc to maintain using that cid or is it inherited from the dialog ?

I forgot to mention, the dialogs are modeless.

On a related matter, why are cids not simply 1,2,3,4 ? I'm seeing ones like 1, 277, 5107, 5323 during 4 different simultaneous server connects.