       @winList.add win
       @ircEvents.addEventsFrom irc
       @channelDisplay.add conn.name
+      irc.setPreferredNick @previousNick if @previousNick?
       if win == @currentWindow
+        @updateStatus()
         @channelDisplay.select name
-      irc.setPreferredNick @previousNick if @previousNick?
     irc.connect(server, port)
 
   onIRCEvent: (e) =>

    @currentWindow.message '*', "Type /server <server> [port] to connect, then /nick <my_nick> and /join <#channel>.", "circ"
    @currentWindow.message '*', "Switch windows with alt+[0-9] or clicking in the channel list on the left.", "circ"

    @updateStatus 'Welcome to CIRC! Type /help to see a full list of comamnds.'

    @connections = {}



  updateStatus: (status) ->
    if !status
      nick = @currentWindow.conn?.irc.nick ? @currentWindow.conn?.irc.preferredNick
      status = "[#{nick}] #{@currentWindow.target ? ''}"
    $('#status').text(status)

  switchToWindow: (win) ->
