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

    @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 = {}


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

  onIRCEvent: (e) =>
