         let dispatchTime: dispatch_time_t = dispatch_time(DISPATCH_TIME_NOW, Int64(1 * Double(NSEC_PER_SEC)))
         dispatch_after(dispatchTime, dispatch_get_main_queue(), {
             self.chatConnection!.disconnectAfterWriting()
+            Logger.Debug("Disconnected")
         })
     }
 ////////////////////////////////////////

extension IRCConnection : GCDAsyncSocketDelegate {
    @objc
    func socket(sock: GCDAsyncSocket!, didConnectToHost host: String!, port: UInt16) {

        
        
        if credentials?.password?.characters.count > 0 {
            sendStringMessage("PASS \(credentials!.password!)", immedtiately: true)

    }
    
    func sendRawMessage(raw : NSData, immeditately now : Bool) {
        Logger.Info("Queing: \(String(data: raw, encoding: NSUTF8StringEncoding)!)")
        
        var nnow = now
        if !nnow {
            dispatch_semaphore_wait(sendQueueLock, DISPATCH_TIME_FOREVER)
