 				@onRemoveMemberFromRoom matchResult[1], matchResult[2]
 				continue
 
-			matchResult = @quiteMemberRegex.exec line
-			if matchResult
-				@onQuiteMember matchResult[1]
+			matchResult = @quitMemberRegex.exec line
+			if matchResult
+				@onQuitMember matchResult[1]
 				continue
 
 			matchResult = @successLoginMessageRegex.exec line

		@endMemberListRegex = /^.+#(\S+) :End of \/NAMES list.$/
		@addMemberToRoomRegex = /^:(\S+)!~\S+ JOIN #(\S+)$/
		@removeMemberFromRoomRegex = /^:(\S+)!~\S+ PART #(\S+)$/
		@quiteMemberRegex = /^:(\S+)!~\S+ QUIT .*$/

	connect: (@loginCb) =>
		@socket.connect @ircPort, @ircHost, @onConnect

		console.log '[irc] onRemoveMemberFromRoom -> '.yellow, 'roomName:', roomName, 'member:', member
		RocketChat.models.Rooms.removeUsernameByName roomName, member

	onQuitMember: (member) ->
		console.log '[irc] onQuitMember ->'.yellow, 'username:', member
		RocketChat.models.Rooms.removeUsernameFromAll member

		Meteor.users.update {name: member},
