thats your code doing that, i never thought you could issue a join / msg / part with out it being event driven or timer driven.

Whats happening is liley this

12:00:00.00 Join other channel (this takes say 1 second to complete)
12:00:00.05 msg other channel (this dont work your not in that channel yet, so maybe it goes to your channel)
12:00:00.10 part other channel (this dont work your not in that channel yet, so maybe it parts your channel)
12:00:00.15 ..
:
12:00:00.95 ..
12:00:01.00 [join other channel completes] (your now in the other channel)

The 1 second is just a estimate, likely a larger than real one.